Surpress the field space
Hi All
i have added one field to exsting report layout
after that some part of output is going to next page , no of pages increasing
and when field value is null getting space
why pages inceasing how can i hadle it be same as before,
and how to surprass the space
it is urgent please advice me
thanks in advace
ashok.
Thanks for ur reply shashu,
it is custom report i just added one field to layout model,
i set venrtical is veriable for this filed and define formatt code
i havenot changed anyone
but why no of pages increasing than previous one
if we add any column what we need to change
mense mail frame or any other
plx advicer me
Similar Messages
-
How to set white spaces between the fields in dataset??
Hi all,
I am writing a set on information to from infotypes to a text file. Its a fixed width file. How do set white spaces in the fields for dataset?
Example:
TYPES: begin of header,
filler(40) type c,
id(3) type c,
filler2(7) type c,
delimiter type c,
end of header.
DATA header type header.
header-filler1 = ' '.
header-id = '100'.
header-filler2 = ' '.
header-delimiter = cl_abap_char_utilities=>newline. ( do it to get a new line)
my_table = header.
append my_table.
DATA: out_file(256) type C,
codepage_ref type ref to CX_SY_CONVERSION_CODEPAGE,
out_char type c,
size type i,
insert_string type string,
insert_size type i.
out_file = filename.
open dataset out_file for output in text mode ENCODING NON-UNICODE.
LOOP AT my_table.
size = strlen( my_table ).
insert_string = ''.
DO size TIMES.
offset = sy-index - 1.
try.
out_char = my_table+offset(1).
IF out_char = SPACE.
CONCATENATE insert_string '' INTO insert_string SEPARATED BY SPACE.
ELSE.
CONCATENATE insert_string out_char INTO insert_string.
transfer insert_string to out_file NO END OF LINE .
insert_string = ''.
ENDIF.
catch CX_SY_CONVERSION_CODEPAGE.
insert_size = strlen( insert_string ) - 1.
insert_string = insert_string(insert_size).
endtry.
ENDDO.
transfer CL_ABAP_CHAR_UTILITIES=>NEWLINE TO out_file NO END OF LINE.
ENDLOOP.
close dataset out_file.
How do I get to insert the space for filler1 and filler2?
Edited by: Siong Chao on Oct 4, 2011 4:56 AM
Edited by: Siong Chao on Oct 4, 2011 8:27 AM
Edited by: Siong Chao on Oct 4, 2011 8:29 AMproblem lies in the open dataset codes
Used:
open dataset out_file for output in text mode encoding non-unicode message msg.
if sy-subrc= 0.
loop at my_table.
transfer my_table to out_file
transfer cl_abap_char_utilities=>newline to out_file no end of line.
endloop. -
Remove extra space value of the field in text element
Dear All,
Can any one please help me out to remove the blank spaces in the text elements of SF.
we are printing Label in which i want print quantity of material. and i am using MSEG-MENGE for quantity of maetrial.
But the issues is when we are printing the label. We are getting spaces in the Text elements fields &MSEG-MENGE&.
i am also check menge field within mseg table. in which menge field define as QUAN data type with length 13.
<
MAT CODE:&t_MSEG-MATNR&
DESC:&MAKTX&
QTY:&t_MSEG-MENGE&
UOM:&t_MSEG-MEINS&
>
My Output in SF:
MAT CODE:11000002
DESC:Coarse Aggregate 10mm Sieve
QTY: 960
UOM:LBM
MIGO.NO.:4900000025
how to remove extra blank spaces in the text elements ( QTY: 960 )
guide me.........Dear All,
I am using code block in SF before text element.
In The Text Element ...
<
MAT CODE:&t_MSEG-MATNR&
DESC:&MAKTX&
QTY:&t_MSEG-MENGE&
UOM:&t_MSEG-MEINS&
MIGO.NO.:&t_MSEG-MBLNR&
PO.NO.:&t_MSEG-EBELN&
LOCATION:&t_MSEG-WERK&&NAME1&
>
In programe Line ( code block )....
<
read table t_mseg index w_index.
qty = t_mseg-menge.
condense qty.
SELECT SINGLE name1 FROM t001w INTO name1 WHERE werks = t_mseg-werks.
SELECT SINGLE maktx FROM makt INTO maktx WHERE matnr = t_mseg-matnr.
>
My Output:
MAT CODE:11000002
DESC:Coarse Aggregate 10mm Sieve
QTY: 960
UOM:LBM
MIGO.NO.:4900000025
Only problem in value of Quantity field .
guide me......... -
Removing Leading Spaces in the field to be displayed
Hi,
Could you please tell me how to remove leading spaces in currency field in write statement?
the length of the field cannot be changed by writing fieldname(length).
is there any other method to do the same. the length should vary according to the amount in the field.
Ragards,
Krutikahi,
please use "SPLIT " or condense .
eg: SPLIT wa_bseg-hzuon at space into wa_bseg1-hzuon l_space.
to better understand refer this code:
IF it_mhnd IS NOT INITIAL.
SELECT hzuon bukrs gjahr augdt augbl
FROM Bseg
INTO TABLE it_bseg
FOR ALL ENTRIES IN it_mhnd
WHERE belnr = it_mhnd-belnr
AND bukrs = it_mhnd-bukrs
AND gjahr = it_mhnd-gjahr
AND umskz = 'E'.
endif.
data: l_space type char6.
loop at it_bseg into wa_bseg.
SPLIT wa_bseg-hzuon at space into wa_bseg1-hzuon l_space.
wa_bseg1-bukrs = wa_bseg-bukrs.
wa_bseg1-hzuon = wa_bseg-belnr.
wa_bseg1-hzuon = wa_bseg-gjahr.
wa_bseg1-hzuon = wa_bseg-umskz.
append wa_bseg1 to it_bseg1.
clear: l_space, wa_bseg1.
endloop.
IF it_bseg1 IS NOT INITIAL.
SELECT belnr bldat
FROM bsad into table it_bsad
FOR ALL ENTRIES IN it_bseg1
WHERE belnr = it_bseg1-hzuon
AND bukrs = it_bseg1-bukrs
AND augbl = it_bseg1-belnr.
endif.
regards
rahul
Edited by: RAHUL SHARMA on Jan 5, 2009 12:19 PM
Edited by: RAHUL SHARMA on Jan 5, 2009 12:20 PM -
Remove the trailing spaces of a quantity field in smartform
Hi,
I am printing a quantity field in a smartform as follows:
&G_S_DATA-SAL(C)&.
It is compressing the leading spaces but there is a space between the field and full stop.
Eg: if G_S_DATA-SAL = 144.00 the ouptut is displayed as 144.00 . (space between the amount and full stop).
How can I remove this space?
Regards,
Soumya.Hi
Use this.
&G_S_DATA-SAL(CS)&. -
The Property Inspector is missing the V Space and H Space fields in DW6 - where did they go?
I just downloaded DW6. The Property Inspector is missing the V Space and H Space fields, therefore I am unable to add space around my images. Suggestions?
It is no longer available because the problem with that was that it applied spaces around the image rather than where the user actually wanted them. You now need to use CSS and apply margins and paddings and target exactly where you want them by using something like this:
img {
margin-bottom: 0;
margin-right: 0;
margin-left: 0;
margin-top: 0;
padding-top: 0;
padding-right: 0;
padding-bottom: 0;
padding-left: 0;
img {
border: 0;
padding: 0;
The second style is generic to set margin and padding for all four sides.
Good luck. -
Method t create dynamic structure if the field name contains space
HI all,
I am creating a dynamic internal table. Everything id fine but when creating dynamic structure if field name contains space its giving me dump.Can you please suggest me any other methos which takes space in the field name.
Iam using the following method:
gr_struct_typ ?= cl_abap_structdescr=>create( p_components = gt_component ).
In the gt_component i have one of the field with space like ( RU STAND) and its giving error.
Any help will be appreciated.
thanks
Suku.Hello Sukumar
If the space in the fieldname is a mistake then you could simply use:
CONDENSE ld_fieldname NO-GAPS.
However, I guess your fieldname should contain this space:
>...suggest me any other methos which takes space in the field name.
>
Well, have you ever seen a field or column name in SAP standard containing a space in its name???
Regards
Uwe -
How can i check the space in the field.
hi:
how can i check the space in the field.!
for example:
data: string(30) type c value 'sent ence'.
search string for space.
if sy-subrc = 0.
write: 'i am right'.
endif.
but the result is that it cann't check the space.
so how can check the space in the field!!
thank you very much!Hi,
data: v_string(30) type c value 'sent ence'.
DATA : v_cnt TYPE I,
v_num TYPE I VALUE 1,
v_num1 TYPE I.
v_cnt = strlrn( v_string ).
DO v_cnt TIMES.
IF v_string+v_num1(v_num) EQ SPACE.
write: 'i am right'.
ELSE.
write: 'i am WRONG'.
ENDIF.
v_num1 = v_num1 + 1.
ENDDO. -
Condense the leading spaces for a particular field
hi
total_weight TYPE char10,
I need to condense the leading spaces.for a particular
how shd i do it.shift total_weight left deleting leading space.
Regards,
RIch Heilman -
When clic in the field "i_ekpo-ebeln" tab exit in report ALV
Good Afternoon! *********************************************************
Coloquei all the code, I believe for better clarification. When clico in the field i_ekpo-ebeln in the report is called transaction ME23 c/o GRID this functioning normally, but with the reports List and Hierarquico it does not happen the same and it prints in the baseboard the message "Invalid Function". when standard use buttons, functions of course.
obs.: I had that to create a SET Pf-status for each type of report pos I wanted that when clicar in the field box and clicar in the button "TO PRINT REPORT" it printed sapscript. How I make to solve such problem?
Att, Carlos Eduardo.
REPORT ztreino NO STANDARD PAGE HEADING LINE-SIZE 220.
************************declarações*********************
DATA: BEGIN OF y_ekko OCCURS 0,
ebeln TYPE ekko-ebeln, "Nº documento de compra
bukrs TYPE ekko-bukrs, "Empresa
bsart TYPE ekko-bsart, "Documento de compra
loekz TYPE ekko-loekz, "Código de eliminação
aedat TYPE ekko-aedat, "Data de criação do registro
ernam TYPE ekko-ernam, "Nome do responsável que criou o objeto
lifnr TYPE ekko-lifnr, "Nº conta do fornecedor
ekgrp TYPE ekko-ekgrp, "Grupo de compradores
waers TYPE ekko-waers, "Chave da moeda
BOX TYPE ptrv_approval-box, "campo para chekinbox
END OF y_ekko,
BEGIN OF y_ekpo OCCURS 0,
ebeln TYPE ekpo-ebeln, "Nº documento de compra
ebelp TYPE ekpo-ebelp, "Nº item do documento de compra
loekz TYPE ekpo-loekz, "Código de eliminação
txz01 TYPE ekpo-txz01, "Texto breve
matnr TYPE ekpo-matnr, "Nº material
bukrs TYPE ekpo-bukrs, "Empresa
werks TYPE ekpo-werks, "Centro
menge TYPE ekpo-menge, "Quantidade do pedido
netpr TYPE ekpo-netpr, "Preço líquido no documento de compra
BOX TYPE ptrv_approval-box, "campo para chekinbox
END OF y_ekpo.
*início seleção de dados
SELECTION-SCREEN BEGIN OF BLOCK bl2 WITH FRAME TITLE text-000.
SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP.
*Nº documento de compra
SELECT-OPTIONS : s_ebeln FOR ekko-ebeln NO INTERVALS OBLIGATORY,
s_bukrs FOR ekko-bukrs OBLIGATORY, "Empresa
s_bsart FOR ekko-bsart. "Documento de compra
SELECTION-SCREEN END OF BLOCK bl1.
SELECTION-SCREEN END OF BLOCK bl2.
**fim da seleção de dados----
**início da variante
SELECTION-SCREEN BEGIN OF BLOCK bl4 WITH FRAME TITLE text-000.
SELECTION-SCREEN BEGIN OF BLOCK bl3 WITH FRAME TITLE text-002.
PARAMETERS : p_vari LIKE disvariant-variant.
SELECTION-SCREEN END OF BLOCK bl3.
SELECTION-SCREEN END OF BLOCK bl4.
***fim variante -
***início modo relatório
SELECTION-SCREEN BEGIN OF BLOCK bl5 WITH FRAME TITLE text-000.
SELECTION-SCREEN BEGIN OF BLOCK bl6 WITH FRAME TITLE text-003.
SELECTION-SCREEN SKIP.
PARAMETERS : rb1 RADIOBUTTON GROUP TIPO DEFAULT 'X',
rb2 RADIOBUTTON GROUP TIPO,
rb3 RADIOBUTTON GROUP TIPO.
SELECTION-SCREEN END OF BLOCK bl6.
SELECTION-SCREEN END OF BLOCK bl5.
****fim modo relatório
*******início da opção de download
Dados do arquivo texto de saída.
SELECTION-SCREEN BEGIN OF BLOCK bl9 WITH FRAME TITLE text-004.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(15) text-005.
PARAMETERS: p_gerar AS CHECKBOX.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(15) text-006.
PARAMETERS: p_dir LIKE rlgrap-filename DEFAULT 'c:'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(15) text-007.
PARAMETERS: p_arq LIKE rlgrap-filename DEFAULT 'nota-geral.txt'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK bl9.
DATA :
i_ekko LIKE y_ekko OCCURS 0 WITH HEADER LINE,
i_ekpo LIKE y_ekpo OCCURS 0 WITH HEADER LINE.
i_tabsaida LIKE y_saida OCCURS 0 WITH HEADER LINE.
*********************Fim Declarações*******************************
*********************Declarações ALV*******************************
TYPE-POOLS : slis.
DATA :
s_layout TYPE slis_layout_alv,
t_sort TYPE slis_t_sortinfo_alv WITH HEADER LINE,
t_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
s_grupos TYPE slis_t_sp_group_alv WITH HEADER LINE,
s_keyinfo TYPE slis_keyinfo_alv,
extab TYPE slis_t_extab.
DATA :
variant_exit(1) TYPE c,
def_variant(1) TYPE c,
s_print TYPE slis_print_alv,
s_top TYPE slis_t_listheader,
variante TYPE disvariant,
def_variante TYPE disvariant,
v_repid LIKE sy-repid,
*------pega a data que esta rodando a transação
v_datasaida(10) TYPE C,
*------para saber quantos Pedidos na EKKO
v_exibe TYPE I,
s_selfield type slis_selfield,
v_ucomm like sy-ucomm.
**********************Fim declarações ALV*************************
Contants para Sapscript e declarações *
TABLES: ITCPO.
CONSTANTS: c_on(1) TYPE C VALUE 'X', "Parâmetro para o Sapscript
c_off(1) TYPE C VALUE ''. "Parâmetro para o Sapscript
Data:
v_element(15) TYPE C, "Elemento de texto do Sap Script
v_type(15) TYPE C, "BODY
v_window(15) TYPE C, "Janela
flag TYPE I, "Uma condição para impressão do sapscript
resp TYPE C, "resposta para confirmação do download tab
zlen TYPE I, "Para verificar o um diretório válido
Para a função WS_DOWNLOAD só em declarar as variaveis deste tipo já *
seria o bastante para passar o caminho para a função
TABLES : ekko, ekpo.
initialization *
INITIALIZATION.
PERFORM zf_verifica_variante.
at selection-screen on value-request *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
PERFORM zf_busca_variante_existente.
at seletion-screen *
AT SELECTION-SCREEN.
PERFORM zf_valida_variante.
validar os campo antes de fazer download do arquivo
PERFORM zf_trata_parametros_gerar_arqu.
start-of-selection *
START-OF-SELECTION.
PERFORM zf_seleciona_dados.
Criando ALV *
PERFORM zf_alv.
*& Form zf_verifica_variante
text
--> Verifica se a variante selecionada é existente
FORM zf_verifica_variante.
CLEAR variante.
v_repid = sy-repid.
variante-report = v_repid.
Buscar variante default
def_variante = variante.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = def_variante
EXCEPTIONS
wrong_input = 1
not_found = 2
program_error = 3
OTHERS = 4.
IF sy-subrc EQ 0.
p_vari = def_variante-variant.
ENDIF.
ENDFORM. " zf_verifica_variante
*& Form zf_busca_variante_existente
*- text
*- --> Vai buscar a variante existente
FORM zf_busca_variante_existente.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = variante " Report com as
i_save = 'A' " Variantes Salvas
i_tabname_header = 'I_EKPO' " Tabela interna saida
it_default_fieldcat = t_fieldcat[] " Tabela de formatação
i_display_via_grid = 'X' " Dispara POPUP em ALV
IMPORTING
e_exit = variant_exit " Se não existir variante X
es_variant = def_variante " Variante default
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF variant_exit = space.
p_vari = def_variante-variant. " Recebe variante escolhida
ENDIF.
ENDIF.
ENDFORM. " zf_busca_variante_existente
*-& Form zf_valida_variante
*- text
*- --> Verifica se a variante digitada é válida.
FORM zf_valida_variante.
IF NOT p_vari IS INITIAL.
variante = def_variante. "nome do report
def_variante-variant = p_vari. "nome que foi digitado
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = def_variante
variante = def_variante.
ELSE.
clear variante.
variante-report = v_repid.
ENDIF.
ENDFORM. " zf_valida_variante
-& Form zf_seleciona_dados
*- text
--> Seleciona os dados da ekko e ekpo
FORM zf_seleciona_dados.
SELECT ebeln
bukrs
bsart
loekz
aedat
ernam
lifnr
ekgrp
waers
FROM ekko
INTO TABLE i_ekko
WHERE
( ebeln IN s_ebeln AND
bsart EQ 'NB' ).
SORT I_EKKO ASCENDING.
IF sy-subrc EQ 0.
SELECT ebeln
ebelp
loekz
txz01
matnr
bukrs
werks
menge
netpr
FROM ekpo
INTO TABLE i_ekpo
FOR ALL ENTRIES IN i_ekko
WHERE
( ebeln EQ i_ekko-ebeln ).
ENDIF.
SORT I_EKPO ASCENDING.
Para exibir no topo do relatório no grid
DESCRIBE TABLE I_EKKO LINES v_exibe.
ENDFORM. " zf_seleciona_dados
*-& Form zf_ALV
*- text
--> Opções de alv
FORM zf_alv.
IF rb1 = 'X'.
PERFORM zf_gri.
ENDIF.
IF rb2 = 'X'.
PERFORM ZF_HIERARQUICO.
ENDIF.
IF rb3 = 'X'.
PERFORM ZF_LIST.
ENDIF.
ENDFORM. " zf_ALV
*& Form zf_gri
*- text
*- --> Seqüência para gerar o alv grid
FORM zf_gri.
PERFORM zf_layout.
PERFORM zf_ordena_campos.
PERFORM zf_monta_campos_alv.
PERFORM zf_print.
PERFORM zf_grupo.
PERFORM zf_top USING s_top.
IF NOT I_EKPO[] IS INITIAL.
PERFORM zf_imprime_alv.
ELSE.
MESSAGE s000(zcl001) WITH 'Nenhum registro encontrado.'.
STOP.
ENDIF.
ENDFORM. " zf_gri
*-& Form zf_layout
*- text
--> cria o layout do alv
FORM zf_layout.
s_layout-box_tabname = 'I_EKPO'.
s_layout-box_fieldname = 'BOX'.
s_layout-get_selinfos = 'X'.
s_layout-detail_popup = 'X'.
s_layout-detail_initial_lines = 'X'.
s_layout-zebra = 'X'.
s_layout-colwidth_optimize = 'X'.
ENDFORM. " zf_layout
*-& Form zf_ordena_campos
*- text
--> Ordenação dos campos
FORM zf_ordena_campos.
CLEAR t_sort.
t_sort-spos = '1'. "prioridade de ordenação
t_sort-fieldname = 'EBELN'. "campo da tab int. de saida
t_sort-tabname = 'I_EKPO'. "tab inter de saida
t_sort-up = 'X'. "ordenação do maior para o menor
APPEND t_sort.
ENDFORM. " zf_ordena_campos
*-& Form zf_monta_campos_alv
text
--> è passado os campos de acordo com a ordem de exibição inicial
FORM zf_monta_campos_alv.
IF rb2 = 'X'.
CLEAR t_FIELDCAT.
t_FIELDCAT-FIELDNAME = 'BOX'.
t_FIELDCAT-TABNAME = 'I_EKKO'.
t_FIELDCAT-CHECKBOX = 'X'.
t_FIELDCAT-INPUT = 'X'.
APPEND t_FIELDCAT.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'EBELN'.
t_fieldcat-tabname = 'I_EKKO'.
t_fieldcat-ref_fieldname = 'EBELN'.
t_fieldcat-ref_tabname = 'EKKO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'BUKRS'.
t_fieldcat-tabname = 'I_EKKO'.
t_fieldcat-ref_fieldname = 'BUKRS'.
t_fieldcat-ref_tabname = 'EKKO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'BSART'.
t_fieldcat-tabname = 'I_EKKO'.
t_fieldcat-ref_fieldname = 'BSART'.
t_fieldcat-ref_tabname = 'EKKO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'AEDAT'.
t_fieldcat-tabname = 'I_EKKO'.
t_fieldcat-ref_fieldname = 'AEDAT'.
t_fieldcat-ref_tabname = 'EKKO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'ERNAM'.
t_fieldcat-tabname = 'I_EKKO'.
t_fieldcat-ref_fieldname = 'ERNAM'.
t_fieldcat-ref_tabname = 'EKKO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'LIFNR'.
t_fieldcat-tabname = 'I_EKKO'.
t_fieldcat-ref_fieldname = 'LIFNR'.
t_fieldcat-ref_tabname = 'EKKO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'EKGRP'.
t_fieldcat-tabname = 'I_EKKO'.
t_fieldcat-ref_fieldname = 'EKGRP'.
t_fieldcat-ref_tabname = 'EKKO'.
APPEND t_fieldcat.
ENDIF.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'EBELN'.
t_fieldcat-tabname = 'I_EKPO'.
t_fieldcat-ref_fieldname = 'EBELN'.
t_fieldcat-ref_tabname = 'EKPO'.
t_fieldcat-key = 'X'.
t_fieldcat-Hotspot = 'X'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
T_fieldcat-fieldname = 'EBELP'.
T_fieldcat-tabname = 'I_EKPO'.
T_fieldcat-ref_fieldname = 'EBELP'.
T_fieldcat-ref_tabname = 'EKPO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'MATNR'.
t_fieldcat-tabname = 'I_EKPO'.
t_fieldcat-ref_fieldname = 'MATNR'.
t_fieldcat-ref_tabname = 'EKPO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'WERKS'.
t_fieldcat-tabname = 'I_EKPO'.
t_fieldcat-ref_fieldname = 'WERKS'.
t_fieldcat-ref_tabname = 'EKPO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'MENGE'.
t_fieldcat-tabname = 'I_EKPO'.
t_fieldcat-ref_fieldname = 'MENGE'.
t_fieldcat-ref_tabname = 'EKPO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'NETPR'.
t_fieldcat-tabname = 'I_EKPO'.
t_fieldcat-ref_fieldname = 'NETPR'.
t_fieldcat-ref_tabname = 'EKPO'.
t_fieldcat-do_sum = 'X'. "totalizar campo
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'TXZ01'.
t_fieldcat-tabname = 'I_EKPO'.
t_fieldcat-ref_fieldname = 'TXZ01'.
t_fieldcat-ref_tabname = 'EKPO'.
APPEND t_fieldcat.
ENDFORM. " zf_monta_campos_alv
*-& Form zf_top
*- text
*- --> Cria o texto de cabeçalho do ALV, passando por parametro o
--> p_S_TOP para s_top
FORM zf_top USING p_s_top TYPE slis_t_listheader.
DATA: ls_line TYPE slis_listheader.
CLEAR ls_line.
ls_line-typ = 'H'.
ls_line-info = 'Relatório de Compras por Classificação Contábil'.
APPEND ls_line TO p_s_top.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-KEY = 'Parametros Seleção '.
ls_line-info = '- Documento de compra'.
APPEND ls_line TO p_s_top.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-info = '- Empresa'.
APPEND ls_line TO p_s_top.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-info = '- Tip.doc.compra'.
APPEND ls_line TO p_s_top.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-KEY = 'Total Pedido'.
ls_line-info = v_exibe.
APPEND ls_line TO p_s_top.
início Formatar a data
CALL FUNCTION 'DATUMSAUFBEREITUNG'
EXPORTING
IDATE = SY-DATUM
IMPORTING
TDAT8 = v_datasaida.
Fim Formatar a data
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-KEY = 'Data da execução'.
ls_line-info = v_datasaida.
APPEND ls_line TO p_s_top.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-KEY = 'Usuário'.
APPEND ls_line TO p_s_top.
CLEAR ls_line.
ls_line-typ = 'A'.
ls_line-info = sy-uname.
APPEND ls_line TO p_s_top.
ENDFORM. " zf_top
*-& Form zf_print
*- text
*- --> Parametros de Impressão para o ALV
FORM zf_print.
s_print-no_print_selinfos = 'N'.
s_print-no_print_listinfos = 'N'.
ENDFORM. " zf_print
*-& Form zf_imprime_alv
*- text
*- --> Imprime o ALV c/ seu parametros
FORM zf_imprime_alv.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PF_STATUS_SET = 'ZSET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'ZF_USER_COMMAND'
i_callback_program = v_repid
i_callback_top_of_page = 'TOP_OF_PAGE'
is_layout = s_layout
it_fieldcat = t_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS = S_GRUPOS[]
it_sort = t_sort[]
IT_FILTER =
IS_SEL_HIDE =
i_default = 'X'
i_save = 'A'
is_variant = variante
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT = S_PRINT
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = I_EKPO
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " zf_imprime_alv
*-& Form zf_top-of-page
*- text
--> Cabeçalho ALV
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = s_top
i_logo = 'CARLOS_LOGO3'.
I_END_OF_LIST_GRID = .
ENDFORM. " zf_top-of-page
*-& Form ZF_HIERARQUICO
*- text
*- --> RELATÓRIO HIERÁQUICO
form ZF_HIERARQUICO.
PERFORM zf_layout.
PERFORM zf_ordena_campos.
PERFORM zf_monta_campos_alv.
PERFORM zf_print.
PERFORM zf_grupo.
IF NOT I_EKPO[] IS INITIAL.
PERFORM zf_imprime_hierarquico_alv.
ELSE.
MESSAGE s000(zcl001) WITH 'Nenhum registro encontrado.'.
STOP.
ENDIF.
endform. " ZF_HIERARQUICO
*-& Form zf_grupo
text
--> Não é fundamental a criação de grupos de campos, mas facilita
ao usuário na hora de escolher os campos de exibição após o clique do
botão MODIFICAR LAYOUT . Vários campos da fieldcat podem ser
definidos para um mesmo grupo de campo.
form zf_grupo.
MOVE:'Moeda' TO S_GRUPOS-SP_GROUP,
'Campos moeda' TO S_GRUPOS-TEXT.
APPEND S_GRUPOS.
endform. " zf_grupo
*& Form zf_imprime_hierarquico_alv
text
--> p1 text
<-- p2 text
form zf_imprime_hierarquico_alv.
Vamos definir as ligações entre as tabelas para as quebras no momento
da impressão.
s_keyinfo-header01 = 'EBELN'.
s_keyinfo-item01 = 'EBELN'.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
I_CALLBACK_USER_COMMAND = 'ZF_USER_COMMAND'
I_CALLBACK_PF_STATUS_SET = 'ZF_SET_PF_STATUS_HIERARQ'
I_CALLBACK_PROGRAM = v_repid
IS_LAYOUT = S_LAYOUT
IT_FIELDCAT = T_FIELDCAT[]
IT_SPECIAL_GROUPS = S_GRUPOS[]
IT_SORT =
IT_FILTER =
- Parâmetro p/executar sempre com a variante default
I_DEFAULT = 'X'
- Se é possível salvar as variantes
I_SAVE = 'A'
- Nome da variante selecionada
IS_VARIANT = VARIANTE
IT_EVENTS =
IT_EVENT_EXIT =
i_tabname_header = 'I_EKKO'
i_tabname_item = 'I_EKPO'
I_STRUCTURE_NAME_HEADER =
I_STRUCTURE_NAME_ITEM =
is_keyinfo = S_KEYINFO
IS_PRINT = S_PRINT
IS_REPREP_ID =
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab_header = I_EKKO
t_outtab_item = I_EKPO.
endform. " zf_imprime_hierarquico_alv
*& Form ZF_LIST
text
--> p1 text
<-- p2 text
form ZF_LIST.
PERFORM zf_layout.
PERFORM zf_ordena_campos.
PERFORM zf_monta_campos_alv.
PERFORM zf_print.
PERFORM zf_grupo.
IF NOT I_EKPO[] IS INITIAL.
PERFORM zf_imprime_list_alv.
ELSE.
MESSAGE s000(zcl001) WITH 'Nenhum registro encontrado.'.
STOP.
ENDIF.
endform. " ZF_LIST
*& Form zf_imprime_list_alv
text
--> p1 text
<-- p2 text
form zf_imprime_list_alv.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PF_STATUS_SET = 'ZF_SET_PF_STATUS_LIST'
I_CALLBACK_USER_COMMAND = 'ZF_USER_COMMAND'
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = v_repid
I_STRUCTURE_NAME = 'I_EKPO'
IS_LAYOUT = S_LAYOUT
IT_FIELDCAT = T_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS = S_GRUPOS[]
IT_SORT = T_SORT[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'A'
IS_VARIANT = VARIANTE
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT = S_PRINT
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = I_EKPO.
endform. " zf_imprime_list_alv
*& Form zf_user_command
text
--> p1 text
<-- p2 text
form zf_user_command using p_v_ucomm like SY-UCOMM
p_s_selfield type slis_selfield.
*---tratamento de impressão do Sapscript----
CASE p_v_ucomm.
FLAG = 0.
WHEN 'IMPRIMIR' OR 'PRINT'.
LOOP AT i_ekpo.
IF NOT i_ekpo-BOX IS INITIAL.
FLAG = FLAG + 1.
ENDIF.
ENDLOOP.
se tiver selecionado apenas uma box
IF flag EQ 1.
IF p_gerar EQ 'X'.
*-----perform para confirmação de download
PERFORM zf_popup_to_confirm.
ENDIF.
*------chama o form para imprimir o sapscript
PERFORM zf_sapscript.
ENDIF.
box estiver vazia
IF flag EQ 0.
MESSAGE E017(ZCL_GRUPO04). "Selecione apenas uma BOX
"referente ao pedido de compras.
STOP.
ENDIF.
"estiver selecionado + de uma box
IF flag GT 1.
MESSAGE E017(ZCL_GRUPO04). "Selecione apenas uma
"BOX referente ao pedido de compra.
STOP.
ENDIF.
ENDCASE.
CASE p_s_selfield-sel_tab_field.
*observe na exibição do relatório(hierarquico) que temos o EKKO-EBELN
ficaria melhor visualmente, a utilização de clicar no mesmo
WHEN 'I_EKPO-EBELN'. "tab de saida
SET PARAMETER ID 'BES' FIELD p_s_selfield-VALUE.
CALL TRANSACTION 'ME23' AND SKIP FIRST SCREEN.
ENDCASE.
endform. " zf_user_command
*& Form ZSET_PF_STATUS
text
-->P_EXTAB text
form ZSET_PF_STATUS using p_extab.
set pf-status 'BOTOES' EXCLUDING extab.
endform. " ZSET_PF_STATUS
*& Form zf_sapscript
text
--> p1 text
<-- p2 text
form zf_sapscript.
--carregar a ITCPO----
PERFORM zf_itcpo.
----chamar a função Open_form
PERFORM zf_open_form.
*----buscar o fornecedor e seus dados
LOOP AT I_ekko.
v_element = 'CABPRIN'.
v_type = 'BODY'.
v_window = 'JANCABEC'.
PERFORM zf_imprime_form USING v_element
v_type
v_window.
ENDLOOP.
*----buscar o documento de compra selecionado
LOOP AT i_ekpo.
IF i_ekpo-BOX = 'X'.
v_element = 'MAIN'.
v_type = 'BODY'.
v_window = 'MAIN'.
PERFORM zf_imprime_form USING v_element
v_type
v_window.
*---o comando EXIT é para que somente quando 1 registro for selecionado
no relatório e a verificação da igualdade acontecer faz que saia do
Loop
EXIT.
ENDIF.
ENDLOOP.
PERFORM zf_close_form.
endform. " zf_sapscript
*& Form zf_itcpo
text
--> p1 text
<-- p2 text
form zf_itcpo.
*Parâmetros para impressão da tabela ITCPO
ITCPO-TDCOPIES = 1. "Quantidade de cópias
ITCPO-TDPAGESLCT = ''. "Seleção de páginas
ITCPO-TDPROGRAM = SY-REPID. "Captura o nome do programa
ITCPO-TDIMMED = c_on. "Saída imediata do relatório
ITCPO-TDPREVIEW = c_on. "Exibição prévia do relatório
ITCPO-TDDEST = 'LOCL'. "SPOOL: dispositivo de saída
ITCPO-TDFAXUSER = SY-UNAME. "Usuário logado naquele momento
ITCPO-TDSENDDATE = SY-DATUM. "Data de envio desejada
ITCPO-TDSENDTIME = SY-UZEIT. "Hora envio desejada
ITCPO-TDNEWID = c_on. "Nova ordem SPOOL
ITCPO-TDARMOD = c_on. "IMPRIMIR: modo de arquivamento
ITCPO-TDTITLE = 'Relatório de Compras por Classificação Contábil'.
endform. " zf_itcpo
*& Form zf_open_formBoa Tarde Carlos,
Welcome to the SDN Forums. SDN gets it's power from the large community throughout the world. To harvest that power of knowledge we have settled on one language for posts here which is English.
Clearly English is not your first language, but don't be afraid, I would vouch that for most of the participant here on SDN English is the second language.
As it is for me. I am just lucky, that I am living in the States long enough that German colleagues start to look at me strangely when I talk to them in German, because it doesn't totally sound right anymore
So we are very forgiving her in SDNland regarding grammar and spelling (although not as much anymore in the Weblogs), we even provide a spell checker.
Please post your question again in English.
If people don't understand you they will ask you about the things that they don't understand and you can then clarify.
Try it out. Your chance of an excellent responds is way higher.
Boa sorte, Mark. -
What is vendor performance report what are the fields using in the report
What is vendor performance report what are the fields using in the report and i need some sample reports for that particular topic (clasical report)not using any alvs or any advance topics.
U R Satish Patnaikhi
good
*"Table declarations...................................................
TABLES:
EKKO, " Purchasing Document Header
CDHDR, " Change document header
SSCRFIELDS. " Fields on selection screens
*"Selection screen elements............................................
SELECT-OPTIONS:
S_EBELN FOR EKKO-EBELN, " Purchasing Document Number
S_LIFNR FOR EKKO-LIFNR, " Vendor's account number
S_EKGRP FOR EKKO-EKGRP, " Purchasing group
S_BEDAT FOR EKKO-BEDAT, " Purchasing Document Date
S_UDATE FOR CDHDR-UDATE. " Creation date of the change
" document
*" Data declarations...................................................
Field String to hold Purchase Document Number *
DATA:
BEGIN OF FS_EBELN,
EBELN(90) TYPE C, " Purchase Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created
" the Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
END OF FS_EBELN,
Field String to hold Purchase Document Header *
BEGIN OF FS_EKKO,
EBELN TYPE EKKO-EBELN, " Purchasing Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
" Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
END OF FS_EKKO,
Field String to hold Account Number and name of the Vendor *
BEGIN OF FS_LFA1,
LIFNR TYPE LFA1-LIFNR, " Account Number of Vendor
NAME1 TYPE LFA1-NAME1, " Name1
END OF FS_LFA1,
Field String to hold Change date and the name of the user *
BEGIN OF FS_CDHDR,
OBJECTCLAS TYPE CDHDR-OBJECTCLAS, " Object Class
OBJECTID TYPE CDHDR-OBJECTID, " Object value
CHANGENR TYPE CDHDR-CHANGENR, " Document change number
USERNAME TYPE CDHDR-USERNAME, " User name
UDATE TYPE CDHDR-UDATE, " Creation date of the change
" document
END OF FS_CDHDR,
Field String to hold Change document items *
BEGIN OF FS_CDPOS,
OBJECTCLAS TYPE CDPOS-OBJECTCLAS," Object class
OBJECTID(10) TYPE C, " Object Value
CHANGENR TYPE CDPOS-CHANGENR, " Document change number
TABNAME TYPE CDPOS-TABNAME, " Table Name
FNAME TYPE CDPOS-FNAME, " Field Name
VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
END OF FS_CDPOS,
Field String to hold Date Element Name *
BEGIN OF FS_DATAELE,
TABNAME TYPE DD03L-TABNAME, " Table Name
FIELDNAME TYPE DD03L-FIELDNAME, " Field Name
ROLLNAME TYPE DD03L-ROLLNAME, " Data element (semantic domain)
END OF FS_DATAELE,
Field String to hold Short Text of the Date Element *
BEGIN OF FS_TEXT,
ROLLNAME TYPE DD04T-ROLLNAME, " Data element (semantic domain)
DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
" Repository Objects
END OF FS_TEXT,
Field String to hold data to be displayed on the ALV grid *
BEGIN OF FS_OUTTAB,
EBELN TYPE EKKO-EBELN, " Purchasing Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
" Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
WERKS TYPE LFA1-WERKS, " Plant
NAME1 TYPE LFA1-NAME1, " Name1
USERNAME TYPE CDHDR-USERNAME, " User name
UDATE TYPE CDHDR-UDATE, " Creation date of the change
" document
DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
" Repository Objects
VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
END OF FS_OUTTAB,
Internal table to hold Purchase Document Number *
T_EBELN LIKE STANDARD TABLE
OF FS_EBELN,
Internal table to hold Purchase Document Header *
T_EKKO LIKE STANDARD TABLE
OF FS_EKKO,
Temp Internal table to hold Purchase Document Header *
T_EKKO_TEMP LIKE STANDARD TABLE
OF FS_EKKO,
Internal table to hold Account number and Name of the Vendor *
T_LFA1 LIKE STANDARD TABLE
OF FS_LFA1,
Internal Table to hold Change date and the name of the user *
T_CDHDR LIKE STANDARD TABLE
OF FS_CDHDR,
Internal Table to hold Change document items *
T_CDPOS LIKE STANDARD TABLE
OF FS_CDPOS,
Temp. Internal Table to hold Change document items *
T_CDPOS_TEMP LIKE STANDARD TABLE
OF FS_CDPOS,
Internal Table to hold Data Element Name *
T_DATAELE LIKE STANDARD TABLE
OF FS_DATAELE,
Temp. Internal Table to hold Data Element Name *
T_DATAELE_TEMP LIKE STANDARD TABLE
OF FS_DATAELE,
Internal Table to hold Short Text of the Date Element *
T_TEXT LIKE STANDARD TABLE
OF FS_TEXT,
Internal Table to hold data to be displayed on the ALV grid *
T_OUTTAB LIKE STANDARD TABLE
OF FS_OUTTAB.
C L A S S D E F I N I T I O N *
CLASS LCL_EVENT_HANDLER DEFINITION DEFERRED.
*" Data declarations...................................................
Work variables *
DATA:
W_EBELN TYPE EKKO-EBELN, " Purchasing Document Number
W_LIFNR TYPE EKKO-LIFNR, " Vendor's account number
W_EKGRP TYPE EKKO-EKGRP, " Purchasing group
W_VALUE TYPE EKKO-EBELN, " Reflected Value
W_SPACE VALUE ' ', " Space
W_FLAG TYPE I, " Flag Variable
W_VARIANT TYPE DISVARIANT, " Variant
*--- ALV Grid
W_GRID TYPE REF TO CL_GUI_ALV_GRID,
*--- Event Handler
W_EVENT_CLICK TYPE REF TO LCL_EVENT_HANDLER,
*--- Field catalog table
T_FIELDCAT TYPE LVC_T_FCAT.
AT SELECTION-SCREEN EVENT *
AT SELECTION-SCREEN ON S_EBELN.
Subroutine to validate Purchase Document Number.
PERFORM VALIDATE_PD_NUM.
AT SELECTION-SCREEN ON S_LIFNR.
Subroutine to validate Vendor Number.
PERFORM VALIDATE_VEN_NUM.
AT SELECTION-SCREEN ON S_EKGRP.
Subroutine to validate Purchase Group.
PERFORM VALIDATE_PUR_GRP.
START-OF-SELECTION EVENT *
START-OF-SELECTION.
Subroutine to select all Purchase orders.
PERFORM SELECT_PO.
CHECK W_FLAG EQ 0.
Subroutine to select Object values.
PERFORM SELECT_OBJ_ID.
CHECK W_FLAG EQ 0.
Subroutine to select Changed values.
PERFORM SELECT_CHANGED_VALUE.
CHECK W_FLAG EQ 0.
Subroutine to Select Purchase Orders.
PERFORM SELECT_PUR_DOC.
Subroutine to select Vendor Details.
PERFORM SELECT_VENDOR.
Subroutine to select Text for the Changed values.
PERFORM DESCRIPTION.
END-OF-SELECTION EVENT *
END-OF-SELECTION.
IF NOT T_EKKO IS INITIAL.
Subroutine to populate the Output Table.
PERFORM FILL_OUTTAB.
Subroutine to build Field Catalog.
PERFORM PREPARE_FIELD_CATALOG CHANGING T_FIELDCAT.
CALL SCREEN 100.
ENDIF. " IF NOT T_EKKO...
CLASS LCL_EVENT_HANDLER DEFINITION
Defining Class which handles events
CLASS LCL_EVENT_HANDLER DEFINITION .
PUBLIC SECTION .
METHODS:
HANDLE_HOTSPOT_CLICK
FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW_ID E_COLUMN_ID.
ENDCLASS. " LCL_EVENT_HANDLER DEFINITION
CLASS LCL_EVENT_HANDLER IMPLEMENTATION
Implementing the Class which can handle events
CLASS LCL_EVENT_HANDLER IMPLEMENTATION .
*---Handle Double Click
METHOD HANDLE_HOTSPOT_CLICK .
Subroutine to get the HotSpot Cell information.
PERFORM GET_CELL_INFO.
SET PARAMETER ID 'BES' FIELD W_VALUE.
CALL TRANSACTION 'ME23N'.
ENDMETHOD. " HANDLE_HOTSPOT_CLICK
ENDCLASS. " LCL_EVENT_HANDLER
*& Module STATUS_0100 OUTPUT
PBO Event
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'OOPS'.
SET TITLEBAR 'TIT'.
Subroutine to fill the Variant Structure
PERFORM FILL_VARIANT.
IF W_GRID IS INITIAL.
CREATE OBJECT W_GRID
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
I_PARENT = CL_GUI_CONTAINER=>SCREEN0
I_APPL_EVENTS =
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
I_FCAT_COMPLETE = SPACE
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. " IF SY-SUBRC <> 0
CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT = W_VARIANT
I_SAVE = 'A'
I_DEFAULT = 'X'
IS_LAYOUT =
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
IR_SALV_ADAPTER =
CHANGING
IT_OUTTAB = T_OUTTAB
IT_FIELDCATALOG = T_FIELDCAT
IT_SORT =
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. " IF SY-SUBRC <> 0.
ENDIF. " IF W_GRID IS INITIAL
CREATE OBJECT W_EVENT_CLICK.
SET HANDLER W_EVENT_CLICK->HANDLE_HOTSPOT_CLICK FOR W_GRID.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
PAI Event
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CANCEL'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form PREPARE_FIELD_CATALOG
Subroutine to build the Field catalog
<--P_T_FIELDCAT Field Catalog Table
FORM PREPARE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT .
DATA LS_FCAT TYPE LVC_S_FCAT.
Purchasing group...
LS_FCAT-FIELDNAME = 'EKGRP'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Purchasing Document Number...
LS_FCAT-FIELDNAME = 'EBELN'.
LS_FCAT-REF_TABLE = 'EKKO' .
LS_FCAT-EMPHASIZE = 'C411'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-HOTSPOT = 'X'.
APPEND LS_FCAT TO PT_FIELDCAT .
CLEAR LS_FCAT .
Name of Person who Created the Object...
LS_FCAT-FIELDNAME = 'ERNAM'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-OUTPUTLEN = '15' .
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Purchasing Document Date...
LS_FCAT-FIELDNAME = 'BEDAT'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Vendor's account number...
LS_FCAT-FIELDNAME = 'LIFNR'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Account Number of Vendor or Creditor...
LS_FCAT-FIELDNAME = 'NAME1'.
LS_FCAT-REF_TABLE = 'LFA1'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-COLTEXT = 'Vendor Name'(001).
LS_FCAT-SELTEXT = 'Vendor Name'(001).
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Creation date of the change document...
LS_FCAT-FIELDNAME = 'UDATE'.
LS_FCAT-REF_TABLE = 'CDHDR'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-COLTEXT = 'Change Date'(002).
LS_FCAT-SELTEXT = 'Change Date'(002).
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
User name of the person responsible in change document...
LS_FCAT-FIELDNAME = 'USERNAME'.
LS_FCAT-REF_TABLE = 'CDHDR'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-COLTEXT = 'Modified by'(003).
LS_FCAT-SELTEXT = 'Modified by'(003).
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Short Text Describing R/3 Repository Objects...
LS_FCAT-FIELDNAME = 'DDTEXT'.
LS_FCAT-REF_TABLE = 'DD04T'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '15'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Old contents of changed field...
LS_FCAT-FIELDNAME = 'VALUE_OLD'.
LS_FCAT-REF_TABLE = 'CDPOS'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '12'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
New contents of changed field...
LS_FCAT-FIELDNAME = 'VALUE_NEW'.
LS_FCAT-REF_TABLE = 'CDPOS'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '12'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
ENDFORM. " PREPARE_FIELD_CATALOG
*& Form SELECT_PO
Subroutine to select all the Purchase Orders
There are no interface parameters to be passed to this subroutine.
FORM SELECT_PO .
SELECT EBELN " Purchasing Document Number
ERNAM " Name of Person who Created
" the Object
LIFNR " Vendor's account number
EKGRP " Purchasing group
BEDAT " Purchasing Document Date
FROM EKKO
PACKAGE SIZE 10000
APPENDING TABLE T_EBELN
WHERE EBELN IN S_EBELN
AND BEDAT IN S_BEDAT.
ENDSELECT.
IF SY-SUBRC NE 0.
W_FLAG = 1.
MESSAGE S401(M8).
ENDIF. " IF SY-SUBRC NE 0
ENDFORM. " SELECT_PO
*& Form SELECT_OBJ_ID
Subroutine to select Object ID
There are no interface parameters to be passed to this subroutine.
FORM SELECT_OBJ_ID .
IF NOT T_EBELN IS INITIAL.
SELECT OBJECTCLAS " Object Class
OBJECTID " Object value
CHANGENR " Document change number
USERNAME " User name
UDATE " Creation date
FROM CDHDR
INTO TABLE T_CDHDR
FOR ALL ENTRIES IN T_EBELN
WHERE OBJECTID EQ T_EBELN-EBELN
AND UDATE IN S_UDATE
AND TCODE IN ('ME21N','ME22N','ME23N').
ENDSELECT.
IF SY-SUBRC NE 0.
W_FLAG = 1.
MESSAGE S833(M8) WITH 'Header Not Found'(031).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_EBELN IS INITIAL
ENDFORM. " SELECT_OBJ_ID
*& Form SELECT_CHANGED_VALUE
Subroutine to select Changed Values
There are no interface parameters to be passed to this subroutine.
FORM SELECT_CHANGED_VALUE .
IF NOT T_CDHDR IS INITIAL.
SELECT OBJECTCLAS " Object class
OBJECTID " Object value
CHANGENR " Document change number
TABNAME " Table Name
FNAME " Field Name
VALUE_NEW " New contents of changed field
VALUE_OLD " Old contents of changed field
FROM CDPOS
PACKAGE SIZE 10000
APPENDING TABLE T_CDPOS
FOR ALL ENTRIES IN T_CDHDR
WHERE OBJECTCLAS EQ T_CDHDR-OBJECTCLAS
AND OBJECTID EQ T_CDHDR-OBJECTID
AND CHANGENR EQ T_CDHDR-CHANGENR.
ENDSELECT.
IF SY-SUBRC NE 0.
W_FLAG = 1.
MESSAGE S833(M8) WITH 'Item Not Found'(032).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_CDHDR IS INITIAL
T_CDPOS_TEMP[] = T_CDPOS[].
ENDFORM. " SELECT_CHANGED_VALUE
*& Form SELECT_PUR_DOC
Subroutine to select Purchase Order Details
There are no interface parameters to be passed to this subroutine.
FORM SELECT_PUR_DOC .
IF NOT T_CDPOS IS INITIAL.
SORT T_EBELN BY EBELN.
LOOP AT T_CDPOS INTO FS_CDPOS.
READ TABLE T_EBELN INTO FS_EBELN WITH KEY EBELN =
FS_CDPOS-OBJECTID BINARY SEARCH.
IF SY-SUBRC NE 0.
DELETE TABLE T_EBELN FROM FS_EBELN.
ENDIF. " IF SY-SUBRC NE 0.
ENDLOOP. " LOOP AT T_CDPOS...
LOOP AT T_EBELN INTO FS_EBELN.
MOVE FS_EBELN-EBELN TO FS_EKKO-EBELN.
MOVE FS_EBELN-ERNAM TO FS_EKKO-ERNAM.
MOVE FS_EBELN-LIFNR TO FS_EKKO-LIFNR.
MOVE FS_EBELN-EKGRP TO FS_EKKO-EKGRP.
MOVE FS_EBELN-BEDAT TO FS_EKKO-BEDAT.
APPEND FS_EKKO TO T_EKKO.
ENDLOOP. " LOOP AT T_EBELN...
T_EKKO_TEMP[] = T_EKKO[].
ENDIF. " IF NOT T_CDPOS IS INITIAL
ENDFORM. " SELECT_PUR_DOC
*& Form SELECT_VENDOR
Subroutine to select Vendor details
There are no interface parameters to be passed to this subroutine.
FORM SELECT_VENDOR .
IF NOT T_EKKO IS INITIAL.
SORT T_EKKO_TEMP BY LIFNR.
DELETE ADJACENT DUPLICATES FROM T_EKKO_TEMP COMPARING LIFNR.
SELECT LIFNR " Account Number of Vendor or
" Creditor
NAME1 " Name 1
FROM LFA1
INTO TABLE T_LFA1
FOR ALL ENTRIES IN T_EKKO_TEMP
WHERE LIFNR EQ T_EKKO_TEMP-LIFNR.
IF SY-SUBRC NE 0.
MESSAGE S002(M8) WITH 'Master Details'(033).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_EKKO IS INITIAL
ENDFORM. " SELECT_VENDOR
*& Form DESCRIPTION
Subroutine to get the description
There are no interface parameters to be passed to this subroutine.
FORM DESCRIPTION .
IF NOT T_CDPOS IS INITIAL.
SORT T_CDPOS_TEMP BY TABNAME FNAME.
DELETE ADJACENT DUPLICATES FROM T_CDPOS_TEMP COMPARING TABNAME FNAME
SELECT TABNAME " Table Name
FIELDNAME " Field Name
ROLLNAME " Data element
FROM DD03L
INTO TABLE T_DATAELE
FOR ALL ENTRIES IN T_CDPOS_TEMP
WHERE TABNAME EQ T_CDPOS_TEMP-TABNAME
AND FIELDNAME EQ T_CDPOS_TEMP-FNAME.
IF NOT T_DATAELE IS INITIAL.
T_DATAELE_TEMP[] = T_DATAELE[].
SORT T_DATAELE_TEMP BY ROLLNAME.
DELETE ADJACENT DUPLICATES FROM T_DATAELE_TEMP COMPARING ROLLNAME.
SELECT ROLLNAME " Data element
DDTEXT " Short Text Describing R/3
" Repository Objects
FROM DD04T
INTO TABLE T_TEXT
FOR ALL ENTRIES IN T_DATAELE_TEMP
WHERE ROLLNAME EQ T_DATAELE_TEMP-ROLLNAME
AND DDLANGUAGE EQ SY-LANGU.
IF SY-SUBRC NE 0.
EXIT.
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_DATAELE IS INITIAL.
ENDIF. " IF NOT T_CDPOS IS INITIAL.
ENDFORM. " DESCRIPTION
*& Form FILL_OUTTAB
Subroutine to populate the Outtab
There are no interface parameters to be passed to this subroutine.
FORM FILL_OUTTAB .
SORT T_CDHDR BY OBJECTCLAS OBJECTID CHANGENR.
SORT T_EKKO BY EBELN.
SORT T_LFA1 BY LIFNR.
SORT T_DATAELE BY TABNAME FIELDNAME.
SORT T_TEXT BY ROLLNAME.
LOOP AT T_CDPOS INTO FS_CDPOS.
READ TABLE T_CDHDR INTO FS_CDHDR WITH KEY
OBJECTCLAS = FS_CDPOS-OBJECTCLAS
OBJECTID = FS_CDPOS-OBJECTID
CHANGENR = FS_CDPOS-CHANGENR
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_CDHDR-USERNAME TO FS_OUTTAB-USERNAME.
MOVE FS_CDHDR-UDATE TO FS_OUTTAB-UDATE.
READ TABLE T_EKKO INTO FS_EKKO WITH KEY
EBELN = FS_CDHDR-OBJECTID
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_EKKO-EBELN TO FS_OUTTAB-EBELN.
MOVE FS_EKKO-ERNAM TO FS_OUTTAB-ERNAM.
MOVE FS_EKKO-LIFNR TO FS_OUTTAB-LIFNR.
MOVE FS_EKKO-EKGRP TO FS_OUTTAB-EKGRP.
MOVE FS_EKKO-BEDAT TO FS_OUTTAB-BEDAT.
READ TABLE T_LFA1 INTO FS_LFA1 WITH KEY
LIFNR = FS_EKKO-LIFNR
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_LFA1-NAME1 TO FS_OUTTAB-NAME1.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
MOVE FS_CDPOS-VALUE_NEW TO FS_OUTTAB-VALUE_NEW.
MOVE FS_CDPOS-VALUE_OLD TO FS_OUTTAB-VALUE_OLD.
READ TABLE T_DATAELE INTO FS_DATAELE WITH KEY
TABNAME = FS_CDPOS-TABNAME
FIELDNAME = FS_CDPOS-FNAME
BINARY SEARCH.
IF SY-SUBRC EQ 0.
READ TABLE T_TEXT INTO FS_TEXT WITH KEY
ROLLNAME = FS_DATAELE-ROLLNAME
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_TEXT-DDTEXT TO FS_OUTTAB-DDTEXT.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
APPEND FS_OUTTAB TO T_OUTTAB.
CLEAR FS_OUTTAB.
ENDLOOP.
ENDFORM. " FILL_OUTTAB
*& Form GET_CELL_INFO
Subroutine to get the Cell Information
--> W_VALUE Holds the value of Hotspot clicked
FORM GET_CELL_INFO .
CALL METHOD W_GRID->GET_CURRENT_CELL
IMPORTING
E_ROW =
E_VALUE = W_VALUE
E_COL =
ES_ROW_ID =
ES_COL_ID =
ES_ROW_NO =
ENDFORM. " GET_CELL_INFO
*& Form VALIDATE_PD_NUM
Subroutine to validate Purchase Document Number
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_PD_NUM .
IF NOT S_EBELN[] IS INITIAL.
SELECT EBELN " Purchase Document Number
FROM EKKO
INTO W_EBELN
UP TO 1 ROWS
WHERE EBELN IN S_EBELN.
ENDSELECT.
IF SY-SUBRC NE 0.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E717(M8).
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_EBELN[]...
ENDFORM. " VALIDATE_PD_NUM
*& Form VALIDATE_VEN_NUM
Subroutine to validate Vendor Number
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_VEN_NUM .
IF NOT S_LIFNR[] IS INITIAL.
SELECT LIFNR " Vendor Number
FROM LFA1
INTO W_LIFNR
UP TO 1 ROWS
WHERE LIFNR IN S_LIFNR.
ENDSELECT.
IF SY-SUBRC NE 0.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E002(M8) WITH W_SPACE.
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_LIFNR[]...
ENDFORM. " VALIDATE_VEN_NUM
*& Form VALIDATE_PUR_GRP
Subroutine to validate the Purchase Group
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_PUR_GRP .
IF NOT S_EKGRP[] IS INITIAL.
SELECT EKGRP " Purchase Group
FROM T024
INTO W_EKGRP
UP TO 1 ROWS
WHERE EKGRP IN S_EKGRP.
ENDSELECT.
IF SY-SUBRC NE 0.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E622(M8) WITH W_SPACE.
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_EKFRP[]...
ENDFORM. " VALIDATE_PUR_GRP
*& Form FILL_VARIANT
Subroutine to fill the Variant Structure
There are no interface parameters to be passed to this subroutine
FORM FILL_VARIANT .
Filling the Variant structure
W_VARIANT-REPORT = SY-REPID.
W_VARIANT-USERNAME = SY-UNAME.
ENDFORM. " FILL_VARIANT
reward point if helpful.
thanks
mrutyun^ -
Increase the field width in ALV grid display
hi
My problem is that when i am trying to print data through REUSE_ALV_GRID_DISPLAY, a particular field which contain message is being truncated, i used ls_layout-colwidth_optimiser as 'X' and also t_fieldcat-outputlen = 1000, but still i am having this prblm, but i checked in the internal table that is passed in ALV, the entire data is stored there, but while printing its getting truncated for a particular field, please suggest me a solution to my problem.
Regards
SwarnaliHey Neelam
this is a very old thread, so I don t remember the exact solution which I implemented,
however can you use the i_tab name in the field TABNAME of the field catalog.
Regarding breaking the message, you can use a STRLEN if you are aware at the no. of chars where it should break always or split at space the string in 4 strings.
Inside the field catalog you have to take an internal table with 4 different fields and show it.
Hopefully it should resolve your problem.
Regards
SB -
How to split all the fields of output ls-l from an internal table
Hi all,
Using ls-l command i have brought the file attributes of a file like its read and write permissions,creation date ,path etc in a internal table.
Now how to split all these fields from the internal table or what should be the splitting criteria.
The field contents of internal table are like this:
-rw-rw---- 1 devadm sapsys 18360 apr 29......so on
I want to split this into different fields.
Kindly suggest.
Thank You.Hi,
I think the delimiter will be space. For date alone (Apr 29) you need to concatenate after the string has been split.
Thanks and regards,
S. Chandramouli -
How to check the field existence in a string at Header level?
Hello,
I have a bunch of fields on my_form, just for example here in this posting I am using US state names ....., say for example,
I have 3 fields, their names are as below
1) NY,
2) CA,
3) TX
I placed a hidden a text field, its name is GFL (i mean, Grey Fields List), am using this GFL for my programming purpose
From the back end (in our case, its an ERP -SAP) am populating/filling this GFL field, say for example.... its data looks like, CA TX (i mean, am concatenating the state names with a seperation of a space)
( FYI.....Already i have some JS piece in my_form INITIALIZATION and docReady events for some other purposes)
Now, my requirement is as below,
1) LOOP all the FIELD objects (here they are as State names) of my_form , then check whether their name (NY) existing in GFL's data..........if exisitng (in our case, its not existing) pls. greyed out with readOnly.......... if not existing
(in our case, its not existing) then skip the coloring and readOnly, go to next loop / iteration / state / Field
Actually, i can achieve my requirement by putting JS in each field objet's INITIALIZATION event itslef as below, (but, i have around 200 feilds in my_form, hence i would like to put at HEADER level by generically looping all the field objects in my_form in one piece of code),
var myStateName = /NY/;
var returnValue = GFL.search(myStateName);
if(returnValue != -1){; // This state/field/object is found in the Grey Fields List, hence greyed out with readOnly
this.ui.oneOfChild.border.fill.color.value = "192,192,192";
this.access = "readOnly";
For some other requirement one of expert has provided the below JS in these forums, as below
function findNodes(vNode) {
if (vNode.className === "field") {
if (vNode.isPropertySpecified("name") === true) {
if (vNode.getAttribute("name").search(/_U$/g) !== -1) {
// Script to execute, when a match was found
for (var i = 0; i < vNode.nodes.length; i += 1) {
findNodes(vNode.nodes.item(i));
findNodes(xfa.form);
Actually, I tried to change the above JS as per my requirement, but its not working, pls. provide me correct JS as per my requirement
Thank youTry this:
function findNodes(vNode){
if (vNode.className === "field"){
if (vNode.isPropertySpecified("name")===true){
var myStateName=new RegExp(vNode.name);
var returnValue = GFL.search(myStateName);
if (returnValue!=-1){
this.ui.oneOfChild.border.fill.color.value="192,192,192";
this.access="readOnly";
else{
this.ui.oneOfChild.border.fill.color.value="255,255,255";//whatever colour is open access
this.access="open";
for (var a=0;a<vNode.nodes.length;a++){
findNodes(vNode.nodes.item(a));
findNodes(xfa.form);
Kyle -
After Showing ERROR message make the field editable in subscreen.
Hello Experts,
I have a requirment where i have added a subscreen to the standard screen of ME31K for creating the contract. In my Subcreen i have my custom screen fields that i'm updating in EKKO table through include structure.
Now if user forget to fill the details in my custom fields in the subscreen then i'm giving the error message prompting the user to fill the value in fields.
But the problem is the screen is locked there itself i want to make the field editable so that user can enter some value in the fields. I can not use the stuatus or information message here because doing this i will get the item overview screen which should not come as i want to restrict the user to header details only and fill all the custom fields.
Please provide me with your helpful responses.
Thnaks,
NaveenHi Naveen,
Sorry for the delay.
The code which I gave for popup, i hope its being shown in an IF . . . ENDIF.
So in that condition u can add the following :
IF < ur condition >
< Call message FMs >
SET SCREEN SY-DYNNR. "this would set screen to current screen which is 0201
EXIT.
ENDIF.
Other than this if you like you can set some parameters in the PAI of this screen which redirect to current screen based on some conditions.
So u can manually set OK-CODE and CALFCODE as SPACE, but i dont know how much this can impact the process.
So please follow the above code.
This is available in
Main Program SAPMM06E
Source code of MM06EF0F_FCODE_CALL
IF OK-CODE EQ SPACE AND
CALFCODE EQ SPACE.
SET SCREEN SY-DYNNR.
EXIT.
ENDIF.
Hope this helps.
Regards,
Ateet
Maybe you are looking for
-
Since upgrading to Yosemite mu USB 3 to Ethernet adapter not working
I just recently (earlier today) upgraded to Yosemite 10.10 from Mavericks and now my USB 3.0 to ethernet adapter is not working. I see a bunch of people complaining about this online but I can't follow the solutions. They seem to be playing with pl
-
succesfully create the correct plugin, mime type, class, whatever to get this to work on all formats? Is my encoding wrong, help I'm a newbie! I've tried: mp3 and m4v files, plugin: swf, quicktime and various combinations of plugins and media types
-
How does jmf support for avi format
I have written code to play audio and video filesusing JMF..My code is able to run only in mp3 and other 2 formats, but it is failed to run other formats like avi, mov etc..Now i need to play my video file which is their in avi format. Please tell me
-
AE CC 2014 TIF image sequence import issue
Hi all, I'm trying to import a TIF sequence into AE CC 2014. I click on the first .tif in the sequence, tick "image sequence" in the import dialog and then click OK. It only brings in the first image. I tried renaming the files to remove any undersco
-
CC = itunes for Designers... No Thanks!
CC, bad idea Adobe. Adobe's opening gambit starts with flattery, for us designers.... "At Adobe, we believe our customers are some of the most influential people in the world." You're right, we're also the most product savvy and design conscious cons