SYST-UCOMM
Hi
I am FICO consultant.
I was trying to construct a substitution rule in transaction OBBH. The pre-requisite for this substitution rule is that when the user saves the document then only this rule should trigger and work.
It seems i should have value BU in the field SYST-UCOMM when the user saves the document.
My problem is I dont see this field in the substitution screen.
Any one can help how we can add SYST-UCOMM field into the substitution screen please.
Currently the following field is seen in the substitution screen
SYST-BATCH Backgr. active (X)
SYST-BINPT Batch input act. (X)
SYST-DATUM Current date
SYST-MANDT Client number
SYST-PAUTH Authorization group
SYST-TCODE Transaction code
SYST-UNAME User
Thanks
Ashok
Hi
This is very urgent requirement. Kindly anyone can help answering this question please.
Similar Messages
-
What will be the Structure of itab created with "LIKE TABLE OF sy-ucomm"
Data fcode like table of sy-ucomm
The table thus created will have one column but it will not have any structure.
How can I write a code with this effect:
LOOP AT fcode.
WRITE:/ fcode-????.
ENDLOOP.
This question is just out of my curiosity I undertsand that by altering the declaration like
Data begin of fcode occurs 0,
data ucomm like sy-ucomm,
end of fcode.
I will be able to name it. But out of the academic interest I want to know that without altering the decalation part can we do itHello Flora,
There are two points to be noted here -
1. the table you have created doesn't have a header line.
2. The table you have created doesn't have a "structure".
All internal tables declared with reference to a non-structural type / object have got only one field.
for example -
Data ITAB TYPE I OCCURS 0.
These internal tables have certain limitations. They cannot be displayed in an ALV Grid, for instance.
And since they do not have a <i>structure</i>, the hypen operator '-' doesn't really make sense. When you say SYST-UCOMM, you are referring to the field UCOMM in the structure SYST.
Hope that's clear.
Regards,
Anand Mandalika. -
Hi
What is the difference between sy-ucomm and okcode????Hi,
sy-ucomm is for doing the functions what the user wishes to do at that particular event. You use it in menus and other place . this mainly in using <pfstatus>
ok_code is generally used in screen as of I have used. You will define the function in the screen. and you can use it in the main program.
ok_code acts just as a temporary variable that stores the value of sy-ucomm.
When user interacts with the screen elements, the function code that you have assigned is filled in the sy-ucomm field which is turn gets reflected in OK_CODE.
In your ABAP programs, you should work with the OK_CODE field instead of SY-UCOMM. There are two reasons for this: Firstly, the ABAP program has full control over fields declared within it, and secondly, you should never change the value of an ABAP system field. However, you should also always initialize the OK_CODE field in an ABAP program for the following reason:
In the same way that the OK_CODE field in the ABAP program and the system field SY-UCOMM receive the contents of the corresponding screen fields in the PAI event, their contents are also assigned to the OK_CODE screen field and system field SYST-UCOMM in the PBO event. Therefore, you must clear the OK_CODE field in the ABAP program to ensure that the function code of a screen is not already filled in the PBO event with an unwanted value. This is particularly important when the next PAI event can be triggered with an empty function code (for example, using ENTER). Empty function codes do not affect SY-UCOMM or the OK_CODE field, and consequently, the old field contents are transported.
Diff bet OK-CODE and SY-UCOMM
Difference Between SY-UCOMM and OK_CODE
ok_code/ sy-ucomm usage in dialog program
Thanks. -
Difference between ok_code and sy-ucomm
Hi,
Can any one tell me the difference between ok_code and sy-ucommHi,
Actually OK_CODE and SY-Ucomm are the same. But experts suggest use of OK code for following reason:
In each PAI event that a user triggers by choosing either a pushbutton on the screen or an element in a GUI status, the corresponding function code is placed into the system field SYST-UCOMM or SY-UCOMM and placed in the OK_CODE field (as long as the function code is not empty). Empty function codes are placed in neither the SY-UCOMM field nor the OK_CODE field.
In your ABAP programs, you should work with the OK_CODE field instead of SY-UCOMM. There are two reasons for this: Firstly, the ABAP program has full control over fields declared within it, and secondly, you should never change the value of an ABAP system field. However, you should also always initialize the OK_CODE field in an ABAP program for the following reason:
In the same way that the OK_CODE field in the ABAP program and the system field SY-UCOMM receive the contents of the corresponding screen fields in the PAI event, their contents are also assigned to the OK_CODE screen field and system field SYST-UCOMM in the PBO event. Therefore, you must clear the OK_CODE field in the ABAP program to ensure that the function code of a screen is not already filled in the PBO event with an unwanted value. This is particularly important when the next PAI event can be triggered with an empty function code (for example, using ENTER). Empty function codes do not affect SY-UCOMM or the OK_CODE field, and consequently, the old field contents are transported. -
Difference Between SY-UCOMM and OK_CODE
Hello ,
What is the Exact difference between <b>SY-UCOMM and Ok-Code</b>?Hello,
sy-ucomm is for doing the functions what the user wishes to do at that particular event. You use it in menus and other place . this mainly in using <pfstatus>
ok_code is generally used in screen as of I have used. You will define the function in the screen. and you can use it in the main program.
ok_code acts just as a temporary variable that stores the value of sy-ucomm.
When user interacts with the screen elements, the function code that you have assigned is filled in the sy-ucomm field which is turn gets reflected in OK_CODE.
In your ABAP programs, you should work with the OK_CODE field instead of SY-UCOMM. There are two reasons for this: Firstly, the ABAP program has full control over fields declared within it, and secondly, you should never change the value of an ABAP system field. However, you should also always initialize the OK_CODE field in an ABAP program for the following reason:
In the same way that the OK_CODE field in the ABAP program and the system field SY-UCOMM receive the contents of the corresponding screen fields in the PAI event, their contents are also assigned to the OK_CODE screen field and system field SYST-UCOMM in the PBO event. Therefore, you must clear the OK_CODE field in the ABAP program to ensure that the function code of a screen is not already filled in the PBO event with an unwanted value. This is particularly important when the next PAI event can be triggered with an empty function code (for example, using ENTER). Empty function codes do not affect SY-UCOMM or the OK_CODE field, and consequently, the old field contents are transported.
Regs,
Venkat Ramanan N -
Difference b/w ok_code and sy-ucomm in module pool ?
hai abap gurus,
ok_code and sy-ucomm store the function code of the element.. then y do v use ok-code in the program. y dont v use sy-ucomm... pls clear my doubt...hi,
In your ABAP programs, you should work with the OK_CODE field instead of SY-UCOMM. There are two reasons for this: Firstly, the ABAP program has full control over fields declared within it, and secondly, you should never change the value of an ABAP system field. However, you should also always initialize the OK_CODE field in an ABAP program for the following reason:
In the same way that the OK_CODE field in the ABAP program and the system field SY-UCOMM receive the contents of the corresponding screen fields in the PAI event, their contents are also assigned to the OK_CODE screen field and system field SYST-UCOMM in the PBO event. Therefore, you must clear the OK_CODE field in the ABAP program to ensure that the function code of a screen is not already filled in the PBO event with an unwanted value. This is particularly important when the next PAI event can be triggered with an empty function code (for example, using ENTER). Empty function codes do not affect SY-UCOMM or the OK_CODE field, and consequently, the old field contents are transported. -
Wht is diff b/w sy-ucomm and ok code
hi,
what is diff b/w sy-ucomm and ok-code
Regards,
Rani.Hi,
sy-ucomm is for doing the functions what the user wishes to do at that particular event. You use it in menus and other place . this mainly in using <pfstatus>
ok_code is generally used in screen as of I have used. You will define the function in the screen. and you can use it in the main program.
ok_code acts just as a temporary variable that stores the value of sy-ucomm.
When user interacts with the screen elements, the function code that you have assigned is filled in the sy-ucomm field which is turn gets reflected in OK_CODE.
In your ABAP programs, you should work with the OK_CODE field instead of SY-UCOMM. There are two reasons for this: Firstly, the ABAP program has full control over fields declared within it, and secondly, you should never change the value of an ABAP system field. However, you should also always initialize the OK_CODE field in an ABAP program for the following reason:
In the same way that the OK_CODE field in the ABAP program and the system field SY-UCOMM receive the contents of the corresponding screen fields in the PAI event, their contents are also assigned to the OK_CODE screen field and system field SYST-UCOMM in the PBO event. Therefore, you must clear the OK_CODE field in the ABAP program to ensure that the function code of a screen is not already filled in the PBO event with an unwanted value. This is particularly important when the next PAI event can be triggered with an empty function code (for example, using ENTER). Empty function codes do not affect SY-UCOMM or the OK_CODE field, and consequently, the old field contents are transported.
Diff bet OK-CODE and SY-UCOMM
Difference Between SY-UCOMM and OK_CODE
ok_code/ sy-ucomm usage in dialog program -
Difference b/w ok_code and sy-ucomm
Can any one tell Difference b/w ok_code and sy-ucomm
sy-ucomm is for doing the functions what the user wishes to do at that particular event. You use it in menus and other place . this mainly in using <pfstatus>
ok_code is generally used in screen as of I have used. You will define the function in the screen. and you can use it in the main program.
ok_code acts just as a temporary variable that stores the value of sy-ucomm.
When user interacts with the screen elements, the function code that you have assigned is filled in the sy-ucomm field which is turn gets reflected in OK_CODE.
In your ABAP programs, you should work with the OK_CODE field instead of SY-UCOMM. There are two reasons for this: Firstly, the ABAP program has full control over fields declared within it, and secondly, you should never change the value of an ABAP system field. However, you should also always initialize the OK_CODE field in an ABAP program for the following reason:
In the same way that the OK_CODE field in the ABAP program and the system field SY-UCOMM receive the contents of the corresponding screen fields in the PAI event, their contents are also assigned to the OK_CODE screen field and system field SYST-UCOMM in the PBO event. Therefore, you must clear the OK_CODE field in the ABAP program to ensure that the function code of a screen is not already filled in the PBO event with an unwanted value. This is particularly important when the next PAI event can be triggered with an empty function code (for example, using ENTER). Empty function codes do not affect SY-UCOMM or the OK_CODE field, and consequently, the old field contents are transported.
Diff bet OK-CODE and SY-UCOMM
Difference Between SY-UCOMM and OK_CODE
ok_code/ sy-ucomm usage in dialog program
Please give me reward points... -
Regarding ok_code and sy-ucomm.
hi experts ,
regarding the difference between ok_code and sy-ucomm i searched and found this lines......
answer:::
In the same way that the OK_CODE field in the ABAP program and the system field SY-UCOMM <b>receive the contents of the corresponding screen fields</b> in the PAI event, their contents are also assigned to the OK_CODE screen field and system field SYST-UCOMM in the PBO event.
cud u plz tell me what is the meaning of contents of corresponding screen fields...plz explain it ...and second thing can i declare another variable name instead of ok_code ..is it necessary to write ok_code....thnx in advance...<b>sy-ucomm</b> is for doing the functions what the user wishes to do at that particular event.
You use it in menus and other place . this mainly in using <pfstatus>.
ok_code is generally used in screen as of I have used. You will define the function in the screen. and you can use it in the main program.
ok_code acts just as a temporary variable that stores the value of sy-ucomm.
When user interacts with the screen elements, the function code that you have assigned is filled in the sy-ucomm field which is turn gets reflected in OK_CODE.
In your ABAP programs, you should work with the OK_CODE field instead of SY-UCOMM. There are two reasons for this: Firstly, the ABAP program has full control over fields declared within it, and secondly, you should never change the value of an ABAP system field. However, you should also always initialize the OK_CODE field in an ABAP program for the following reason:
In the same way that the OK_CODE field in the ABAP program and the system field SY-UCOMM receive the contents of the corresponding screen fields in the PAI event, their contents are also assigned to the OK_CODE screen field and system field SYST-UCOMM in the PBO event. Therefore, you must clear the OK_CODE field in the ABAP program to ensure that the function code of a screen is not already filled in the PBO event with an unwanted value. This is particularly important when the next PAI event can be triggered with an empty function code (for example, using ENTER). Empty function codes do not affect SY-UCOMM or the OK_CODE field, and consequently, the old field contents are transported.
Regards,
Pavan -
Regarding sy-ucomm and ok_code
hi experts,
gud morning,
i got something for sy-ucomm and ok_code....
<b>answer:::</b>
In the same way that the OK_CODE field in the ABAP program and the system field SY-UCOMM <b>receive the contents of the corresponding screen fields in the PAI event, their contents are also assigned to the OK_CODE screen field and system field SYST-UCOMM in the PBO event.</b> Therefore, you must clear the OK_CODE field in the ABAP program to ensure that the function code of a screen is not already filled in the PBO event with an unwanted value. This is particularly important when the next PAI event can be triggered with an empty function code (for example, using ENTERS). Empty function codes do not affect SY-UCOMM or the OK_CODE field, and consequently, the old field contents are transported.
cud u plz explain the meaning of the bold part how can we see that the contents are also copied in the pbo side as done in pai.......
nullSAP recommends that in dialog program always use OK_Code instead of sy-ucomm. Here is what the help says
In your ABAP programs, you should work with the OK_CODE field instead of SY-UCOMM. There are two reasons for this: Firstly, the ABAP program has full control over fields declared within it, and secondly, you should never change the value of an ABAP system field. However, you should also always initialize the OK_CODE field in an ABAP program for the following reason:
In the same way that the OK_CODE field in the ABAP program and the system field SY-UCOMM receive the contents of the corresponding screen fields in the PAI event, their contents are also assigned to the OK_CODE screen field and system field SYST-UCOMM in the PBO event. Therefore, you must clear the OK_CODE field in the ABAP program to ensure that the function code of a screen is not already filled in the PBO event with an unwanted value. This is particularly important when the next PAI event can be triggered with an empty function code (for example, using ENTER). Empty function codes do not affect SY-UCOMM or the OK_CODE field, and consequently, the old field contents are transported.
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dba99935c111d1829f0000e829fbfe/content.htm
This is a long standing issue dating back many years. The general answer is that you control the OK_CODE field while SAP controls the SY-UCOMM field. You assign field OK_CODE to the OK code field in the screen painter and SAP copies SY-UCOMM to your OK_CODE field. Now you have control over the value. If you start invoking other code, like SAP utilities that display screens, you can be guaranteed that the value in OK_CODE will still be there, while you have no idea what SAP might be doing with SY-UCOMM.
This is a design decision that was probably made about 20 years ago when screen processing was introduced. In most cases, you can probably use SY-UCOMM and not have any problems but there are probably cases out there where SAP has done something tricky and you will have a problem.
Because there are unknowns out there, I always define an OK_CODE and do not use SY-UCOMM for standard screen processing. For me this is a long standing habit.
OK_Codes are like function code for each button or for any action on the screen.
When you press SAVE or when you Press some Button on the screen, your every action is recorded by using the OK_COde.
for example for ENTER button it is '/00'.
While you record BDC's using SHDB you will come to know all these OK codes. -
Workitem - Vanishes and capturing sy-ucomm
Hello,
I have new to workflow area and have couple of questions. I have browsed through the documentation and could not get clear answers.
1. I am sending a workitem to user, User is supposed to open it and approve/reject. If for user some reason does not do both and exit out of the screen workitems is vanishing from user inbox. How to fix this issue?
2. I want to capture sy-ucomm from in the screen of workitem to workflow method and export it to next step. How to do this.
3. Can I pass more than I parameter to my rule? If yes how and what code should I write to retrieve the values.
Thanks
Nani.If your work item (step) uses a synchronous dialog task the work item is reserved when it is started, not completed.
Unfortunately SAP does not alert the application when the user closes a window using the window menu (or close button that you refer to). This should definitely have lead to some form of syst-ucomm, but it doesn't. I have had the same problem, and user training is the only solution. My experience is that the work item is reserved, as mentioned. My guess is that you have an asynchronous task without terminating events. This will be completed as soon as it is executed.
If you want behaviour to be different you have to either use an asynchronous task with terminating events, use a synchronous task or do some other trick (although I can't really think of any now).
Message was edited by Kjetil Kilhavn:
Darn... just saw that your later update says the work item does not actually vanish. My comments are still valid though, but perhaps not as helpful as they would have been if I had answered sooner.
What you should do if the user doesn't complete his processing and leaves using the "Back" or "Exit" or "Cancel" menu options/toolbar buttons is to raise the cancelled exception in your business object. You do this by using the statement "exit_cancelled." The work item will then be kept in the user's inbox in a reserved status. -
Can't get ok_code &F03 (green back) from copied standard_fullscreen status
Hi SDN,
we are on WAS640. I have a Z-Program which uses FM
REUSE_ALV_GRID_DISPLAY.
Depending on different cases the ALV shows different tables using different t_outtabs. As for the different ALV tables, I also need differnt GUI Status...
Hence I copied the Standard Status called STANDARD_FULLSCREEN to Z_STATUS1 to X...
Now I notice, that all the ALV Buttons like Filtering and Sorting, which are defined in the pf-status under "Application Toolbar" work fine. Here I also added new buttons.
Under "Function Keys" in pf-status there is the ok_code &DATA_SAVE (the disk-symbol) - this is also accessible, bu the next oks like green arrow &F03 or yellow arrow &F15 are not accessible.
I have to change the navigation, as there is sometimes a long history in the program running, and sometimes ittakes 5 or more clicks on the green, yellow or red exit arrow to get back to the initial view of the program.
When turning on Debug mode via /h during runtime, I can see, that I get the ok_code &DATA_SAVE, but nothing happens for the navigation arrows - no debugger comes up. Why is that?
For the access of the ok_codes I follow the ALV FM and set up a form like this:
FORM uc_benutzer USING r_ucomm TYPE sy-ucomm
r_selfield TYPE slis_selfield.
* save stuff
IF r_ucomm = '&DATA_SAVE'. "works fine
ELSEIF r_ucomm = '&F03' OR r_ucomm = '&F12' OR r_ucomm = '&F15'. "does not work
LEAVE TO TRANSACTION 'ZPMIM'.
ENDIF.
some help appreciated,
kind regards, matthias kasigOk, If you get in the PAI you can check what the value of the OK_CODE is? SYST-UCOMM.
Then you can check whether or not this is handled. Note that it is good practice to copy the value of the OK_CODE to a temporary variable.
It's custom to set the PF-status everytime in the PBO (initialization module) of the screen. -
Creating layouts in ALV report
Hi all,
I have created a report when a user creates a layout in the report it should save the variant(layout) and display in the selection-screen with alv_variant and search help.Its working properly.
But I have to create different layouts like the following:
Layout with sort and subtotals,
layout with sort and filter conditions like that.
Can anybody help me regarding this matter.
with regards
chanduSai,
Here is a little sample program which shows you how to recall saved ALV Layouts. It requires the user to run the report, create their own variants, and this program allwos them to recall it from the selection screen.
You can create gobal layouts (for your sorts, and totals) which canbe accessed by any user.
Hope this helps.
Cheers,
Pat.
*& Report ZPATS_ALV *
REPORT zpats_alv .
TABLES: kna1.
TYPE-POOLS: kkblo.
* structures *
DATA: st_fieldcat TYPE slis_fieldcat_alv.
DATA: st_variant1 LIKE disvariant.
DATA: st_variant2 LIKE disvariant.
* internal tables *
DATA: BEGIN OF tbl_kna1 OCCURS 0,
kunnr LIKE kna1-kunnr,
name1 LIKE kna1-name1,
stras LIKE kna1-stras,
telf1 LIKE kna1-telf1,
ort01 LIKE kna1-ort01,
pstlz LIKE kna1-pstlz,
sortl LIKE kna1-sortl,
ernam LIKE kna1-ernam,
spras LIKE kna1-spras,
END OF tbl_kna1.
DATA: tbl_fieldcat TYPE slis_t_fieldcat_alv.
* global variables *
DATA: fieldname(30) TYPE c.
DATA: variant_exit(1) TYPE c,
variant_save(1) TYPE c,
variant_def(1) TYPE c.
* Seelction Screen
PARAMETERS: p_vari LIKE disvariant-variant.
* Initialization Event
INITIALIZATION.
PERFORM variant_init USING st_variant1.
st_variant2 = st_variant1.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = st_variant2
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
p_vari = st_variant2-variant.
ENDIF.
* At Selection Screen On Value Request
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
PERFORM f4_for_variant.
* Start of Selection Event
START-OF-SELECTION.
SELECT kunnr name1 stras telf1 ort01 pstlz sortl ernam spras
INTO CORRESPONDING FIELDS OF TABLE tbl_kna1
FROM kna1.
* End of Selection Event
END-OF-SELECTION.
PERFORM get_fieldcat.
PERFORM create_report.
*& Form get_fieldcat
* text
* --> p1 text
* <-- p2 text
FORM get_fieldcat.
PERFORM write_fieldcat USING 'KUNNR' 'X' 1.
PERFORM write_fieldcat USING 'NAME1' 'X' 2.
PERFORM write_fieldcat USING 'STRAS' ' ' 3.
PERFORM write_fieldcat USING 'TELF1' ' ' 4.
PERFORM write_fieldcat USING 'ORT01' ' ' 5.
PERFORM write_fieldcat USING 'PSTLZ' ' ' 6.
PERFORM write_fieldcat USING 'SORTL' ' ' 7.
PERFORM write_fieldcat USING 'ERNAM' ' ' 8.
PERFORM write_fieldcat USING 'SPRAS' ' ' 9.
ENDFORM. " get_fieldcat
*& Form write_fieldcat
* text
* -->P_0060 text
* -->P_0061 text
* -->P_0062 text
* -->P_0063 text
* -->P_1 text
FORM write_fieldcat USING name
key
pos.
st_fieldcat-fieldname = name.
st_fieldcat-tabname = 'TBL_KNA1'.
st_fieldcat-ref_tabname = 'KNA1'.
st_fieldcat-key = key.
st_fieldcat-col_pos = pos.
IF name = 'PSTLZ'.
st_fieldcat-row_pos = '2'.
ENDIF.
APPEND st_fieldcat TO tbl_fieldcat.
CLEAR st_fieldcat.
ENDFORM. " write_fieldcat
*& Form create_report
* text
* --> p1 text
* <-- p2 text
FORM create_report.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_interface_check = ' '
i_callback_program = 'ZPATS_ALV'
i_callback_user_command = 'USER_COMMANDS'
it_fieldcat = tbl_fieldcat
i_default = 'X'
i_save = 'A'
is_variant = st_variant2
TABLES
t_outtab = tbl_kna1
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. " create_report
*& Form USER_COMMANDS
* text
* --> p1 text
* <-- p2 text
FORM user_commands USING syst-ucomm LIKE syst-ucomm
selfield TYPE slis_selfield.
CASE syst-ucomm.
WHEN '&IC1'.
READ TABLE tbl_kna1 INDEX selfield-tabindex.
SET PARAMETER ID 'KUN' FIELD tbl_kna1-kunnr.
CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
WHEN OTHERS.
ENDCASE.
ENDFORM. " USER_COMMANDS
*& Form VARIANT_INIT
FORM variant_init USING g_variant LIKE disvariant.
* Initialise the Variant Structure
CLEAR g_variant.
g_variant-report = sy-repid.
ENDFORM. " VARIANT_INIT
*& Form f4_for_variant
FORM f4_for_variant.
CLEAR st_variant1.
st_variant1-report = sy-repid.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = st_variant1
i_save = 'A'
IMPORTING
e_exit = variant_exit
es_variant = st_variant2.
IF variant_exit = space.
p_vari = st_variant2-variant.
ENDIF.
ENDFORM. " f4_for_variant -
Problem while calling subroutines in ECC 6.0 version
Hi, here is some problem can you please try to solve.....
I have created three forms TOP_OF_PAGE,DOC_DISPLAY,END_OF_LIST and i have called them by passing to wa_events-form. Up to this every thing is fine, the problem is i am working witth ECC 6.0 so while doing Extended program check through SLIN it is giving some waring like
"FORM DO_DISPLAY_AT_USER_COMMAND not called directly
(check dynamic PERFORMs!!) " for all the three forms which i have created...Please help me out to over come this warning... For ur reference i am giving some code as mentioned below.......
LOOP AT i_events into wa_events.
CASE wa_events-name.
WHEN slis_ev_top_of_page.
wa_events-form = 'TOP_OF_PAGE'.
WHEN slis_ev_end_of_list.
wa_events-form = 'END_OF_LIST'.
WHEN slis_ev_user_command.
wa_events-form = 'DOC_DISPLAY_AT_USER_COMMAND'.
ENDCASE.
MODIFY i_events from wa_events.
ENDLOOP.
ENDFORM. " INIT_ALV_EVENTS
*& Form DOC_DISPLAY
FORM doc_display_at_user_command USING p_ucomm LIKE syst-ucomm
p_selfield TYPE slis_selfield.
CASE p_ucomm.
WHEN '&IC1'.
CLEAR i_out.
READ TABLE i_out into wa1_out INDEX p_selfield-tabindex.
IF sy-subrc EQ 0 .
IF wa1_out-belnr EQ space.
MESSAGE e016(kb).
ELSE.
SET PARAMETER ID 'BLN' FIELD wa1_out-belnr.
SET PARAMETER ID 'BUK' FIELD wa1_out-bukrs.
SET PARAMETER ID 'GJR' FIELD wa1_out-gjahr.
CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.
ENDIF.
ENDIF.
ENDCASE.
ENDFORM. "DOC_DISPLAY_AT_USER_COMMAND
FORM TOP_OF_PAGE *
FORM top_of_page.
PERFORM std_header in program zstandrt
USING sy-cprog sy-title 'L' '1' ' ' 'confidential' 'restricted'.
ENDFORM. "TOP_OF_PAGE
FORM END_OF_LIST *
FORM end_of_list.
Begin of V04 comment >***********************************
IF W_BDC_SESSION EQ 'X'.
SKIP 2.
IF P_NOUPD EQ 'X'.
FORMAT COLOR COL_POSITIVE.
WRITE :/20 ' Created BDC session : '(O02) , P_GROUP.
WRITE :/25 ' Execute Using tcode SM35 ....'(O03).
ELSE.
FORMAT COLOR COL_NEGATIVE.
WRITE :/20 ' Created BDC session For Error Transactions'(O04) ,
P_GROUP.
WRITE :/25 ' Execute Using tcode SM35 ....'(O03).
ENDIF.
FORMAT COLOR COL_NORMAL.
ENDIF.
SKIP 2.
End of V04 comment >************************************
WRITE :/50 ' *** END OF REPORT *** '(o01).
PERFORM print_selections.
ENDFORM. "END_OF_LIST
Thanks & Regards.
Laxman.P
B'lore.Hi
Are you getting the output or not?
You can just ignore this warning in EPC
as this FORM USER_COMMAND is always called indirectly only
But check the Output and see?
<b>Reward points for useful Answers</b>
Regards
Anji -
End of page in ALV Grid Report
Dear ABAPres,
I have developed ALV report using the Function module 'REUSE_ALV_GRID_DISPLAY'.
I want to display the End of Page.How can i achiev this.Please help me in this.
Thanks & Regards,
ashok.Hi ,
See below code....
REPORT zcssd_sales_hours_pend2.
TYPE-POOLS : slis.
*****Tables Used in the Report************************
TABLES : vbak,
tvak,
tvlk,
likp,
vbep,
t001w,
kna1.
*****Global Data Declarations*************************
DATA: i_fieldcat TYPE slis_t_fieldcat_alv ,
wa_fieldcat TYPE slis_fieldcat_alv.
DATA: tbl_fieldcat1 TYPE slis_t_fieldcat_alv ,
st_fieldcat1 TYPE slis_fieldcat_alv.
DATA: w_layout TYPE slis_layout_alv.
DATA: st_layout1 TYPE slis_layout_alv,
v_header TYPE slis_t_listheader,
v_header1 TYPE slis_t_listheader,
v_header2 TYPE slis_t_listheader,
v_events TYPE slis_t_event.
DATA: gt_sort TYPE slis_t_sortinfo_alv.
DATA: i_events TYPE slis_t_event,
i_event_exit TYPE slis_t_event_exit.
DATA: w_events LIKE LINE OF i_events,
w_event_exit LIKE LINE OF i_event_exit.
DATA: i_list_comments TYPE slis_t_listheader.
DATA: w_list_comments LIKE LINE OF i_list_comments.
DATA: w_print TYPE slis_print_alv.
DATA: gs_sort TYPE slis_sortinfo_alv.
*DATA : BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
*****Declaration of Internal Tables****************
TYPES : BEGIN OF ty_vbap_vbak,
vbeln TYPE vbap-vbeln,
posnr TYPE vbap-posnr,
matnr TYPE vbap-matnr,
matkl TYPE vbap-matkl,
zmeng TYPE vbap-zmeng,
meins TYPE vbap-meins,
spart TYPE vbap-spart,
netwr TYPE vbap-netwr,
kwmeng TYPE vbap-kwmeng,
werks TYPE vbap-werks,
route TYPE vbap-route,
netpr TYPE vbap-netpr,
kpein TYPE vbap-kpein,
kmein TYPE vbap-kmein,
auart TYPE vbak-auart,
lifsk TYPE vbak-lifsk,
netwr1 TYPE vbak-netwr,
vkorg TYPE vbak-vkorg,
vtweg TYPE vbak-vtweg,
spart1 TYPE vbak-spart,
vdatu TYPE vbak-vdatu,
kunnr TYPE vbak-kunnr,
END OF ty_vbap_vbak.
DATA : i_vbap_vbak1 TYPE STANDARD TABLE OF ty_vbap_vbak.
DATA : w_vbap_vbak1 LIKE LINE OF i_vbap_vbak1.
DATA : i_vbap_vbak2 TYPE STANDARD TABLE OF ty_vbap_vbak.
DATA : w_vbap_vbak2 LIKE LINE OF i_vbap_vbak2.
TYPES : BEGIN OF ty_knvv,
kunnr TYPE knvv-kunnr,
vkorg TYPE knvv-vkorg,
vtweg TYPE knvv-vtweg,
spart TYPE knvv-spart,
bzirk TYPE knvv-bzirk,
name1 TYPE kna1-name1,
END OF ty_knvv.
DATA : i_knvv1 TYPE STANDARD TABLE OF ty_knvv.
DATA : w_knvv1 LIKE LINE OF i_knvv1.
DATA : i_knvv2 TYPE STANDARD TABLE OF ty_knvv.
DATA : w_knvv2 LIKE LINE OF i_knvv2.
TYPES : BEGIN OF ty_likp,
vbeln TYPE likp-vbeln,
lfart TYPE likp-lfart,
lddat TYPE likp-lddat,
vbtyp TYPE likp-vbtyp,
kunnr TYPE likp-kunnr,
anzpk TYPE likp-anzpk,
netwr TYPE likp-netwr,
werks TYPE likp-werks.
TYPES : END OF ty_likp.
DATA : i_likp TYPE STANDARD TABLE OF ty_likp.
DATA : w_likp LIKE LINE OF i_likp.
DATA : i_t171t TYPE STANDARD TABLE OF t171t.
DATA : w_t171t LIKE LINE OF i_t171t.
TYPES : BEGIN OF ty_lips,
vbeln TYPE lips-vbeln,
posnr TYPE lips-posnr,
matnr TYPE lips-matnr,
matkl TYPE lips-matkl,
werks TYPE lips-werks,
lfimg TYPE lips-lfimg,
netwr TYPE lips-netwr.
TYPES : END OF ty_lips.
DATA : i_lips TYPE STANDARD TABLE OF ty_lips.
DATA : w_lips LIKE LINE OF i_lips.
TYPES : BEGIN OF ty_likp_lips,
vbeln TYPE likp-vbeln,
vkorg TYPE likp-vkorg,
lfart TYPE likp-lfart,
lddat TYPE likp-lddat,
vbtyp TYPE likp-vbtyp,
kunnr TYPE likp-kunnr,
anzpk TYPE likp-anzpk,
netwr TYPE likp-netwr,
werks TYPE likp-werks,
posnr TYPE lips-posnr,
matnr TYPE lips-matnr,
matkl TYPE lips-matkl,
lipswerks TYPE lips-werks,
lfimg TYPE lips-lfimg,
vrkme TYPE lips-vrkme,
vgbel TYPE lips-vgbel,
vtweg TYPE lips-vtweg,
spart TYPE lips-spart,
lipsnetwr TYPE lips-netwr.
TYPES : END OF ty_likp_lips.
DATA : i_likp_lips TYPE STANDARD TABLE OF ty_likp_lips.
DATA : w_likp_lips LIKE LINE OF i_likp_lips.
DATA : i_likp_lips1 TYPE STANDARD TABLE OF ty_likp_lips.
DATA : w_likp_lips1 LIKE LINE OF i_likp_lips1.
TYPES : BEGIN OF ty_vbup,
vbeln TYPE vbup-vbeln,
posnr TYPE vbup-posnr,
lfsta TYPE vbup-lfsta,
wbsta TYPE vbup-wbsta,
END OF ty_vbup.
TYPES : BEGIN OF ty_vbup1,
vbeln TYPE vbup-vbeln,
posnr TYPE vbup-posnr,
lfgsa TYPE vbup-lfgsa,
wbsta TYPE vbup-wbsta,
END OF ty_vbup1.
DATA : i_vbup TYPE STANDARD TABLE OF ty_vbup.
DATA : w_vbup LIKE LINE OF i_vbup.
DATA : i_vbup1 TYPE STANDARD TABLE OF ty_vbup1.
DATA : w_vbup1 LIKE LINE OF i_vbup1.
TYPES : BEGIN OF ty_output,
vbeln TYPE likp-vbeln,
vkorg TYPE likp-vkorg,
lfart TYPE likp-lfart,
lddat TYPE likp-lddat,
vbtyp TYPE likp-vbtyp,
kunnr TYPE likp-kunnr,
anzpk TYPE likp-anzpk,
netwr TYPE likp-netwr,
werks TYPE likp-werks,
posnr TYPE lips-posnr,
matnr TYPE lips-matnr,
matkl TYPE lips-matkl,
lipswerks TYPE lips-werks,
lfimg TYPE lips-lfimg,
vrkme TYPE lips-vrkme,
vgbel TYPE lips-vgbel,
vtweg TYPE lips-vtweg,
spart TYPE lips-spart,
lipsnetwr TYPE lips-netwr,
lfsta TYPE vbup-lfsta,
wbsta TYPE vbup-wbsta,
END OF ty_output.
DATA : i_output TYPE STANDARD TABLE OF ty_output.
DATA : w_output LIKE LINE OF i_output.
DATA : i_output1 TYPE STANDARD TABLE OF ty_output.
DATA : w_output1 LIKE LINE OF i_output1.
TYPES : BEGIN OF ty_vbfa,
vbelv TYPE vbfa-vbelv,
posnv TYPE vbfa-posnv,
vbeln TYPE vbfa-vbeln,
posnn TYPE vbfa-posnn,
vbtyp_n TYPE vbfa-vbtyp_n,
rfmng TYPE vbfa-rfmng,
RFWRT TYPE VBFA-RFWRT,
vbtyp_v TYPE vbfa-vbtyp_v,
END OF ty_vbfa.
DATA : i_vbfa TYPE STANDARD TABLE OF ty_vbfa.
DATA : w_vbfa LIKE LINE OF i_vbfa.
TYPES : BEGIN OF ty_vbfa1,
vbelv TYPE vbfa-vbelv,
posnv TYPE vbfa-posnv,
vbeln TYPE vbfa-vbeln,
posnn TYPE vbfa-posnn,
rfmng TYPE vbfa-rfmng,
rfwrt TYPE vbfa-rfwrt,
END OF ty_vbfa1.
DATA : i_vbfa1 TYPE STANDARD TABLE OF ty_vbfa1.
DATA : w_vbfa1 LIKE LINE OF i_vbfa1.
TYPES: BEGIN OF ty_vbrk_vbrp,
vbeln TYPE vbrk-vbeln,
fkart TYPE vbrk-fkart,
fktyp TYPE vbrk-fktyp,
vbtyp TYPE vbrk-vbtyp,
waerk TYPE vbrk-waerk,
netwr TYPE vbrk-netwr,
posnr TYPE vbrp-posnr,
fkimg TYPE vbrp-fkimg,
vrkme TYPE vbrp-vrkme,
umvkz TYPE vbrp-umvkz,
umvkn TYPE vbrp-umvkn,
netwr1 TYPE vbrp-netwr,
END OF ty_vbrk_vbrp.
DATA : i_vbrk_vbrp TYPE STANDARD TABLE OF ty_vbrk_vbrp.
DATA : w_vbrk_vbrp LIKE LINE OF i_vbrk_vbrp.
TYPES : BEGIN OF ty_vbep,
vbeln TYPE vbep-vbeln,
posnr TYPE vbep-posnr,
wmeng TYPE vbep-wmeng,
lddat TYPE vbep-lddat,
END OF ty_vbep.
DATA : i_vbep TYPE STANDARD TABLE OF ty_vbep.
DATA : w_vbep LIKE LINE OF i_vbep.
TYPES : BEGIN OF ty_vbep_vbup,
vbeln TYPE vbep-vbeln,
posnr TYPE vbep-posnr,
wmeng TYPE vbep-wmeng,
lddat TYPE vbep-lddat,
lfgsa TYPE vbup-lfgsa,
wbsta TYPE vbup-wbsta,
END OF ty_vbep_vbup.
DATA : i_vbep_vbup TYPE STANDARD TABLE OF ty_vbep_vbup.
DATA : w_vbep_vbup LIKE LINE OF i_vbep_vbup.
TYPES : BEGIN OF ty_makt,
matnr TYPE mara-matnr,
maktx TYPE makt-maktx,
END OF ty_makt.
DATA : i_makt TYPE STANDARD TABLE OF ty_makt.
DATA : w_makt LIKE LINE OF i_makt.
TYPES : BEGIN OF ty_final,
lddat TYPE likp-lddat,
werks TYPE vbap-werks,
bzirk TYPE knvv-bzirk,
bztxt TYPE t171t-bztxt,
kunnr TYPE vbak-kunnr,
name1 TYPE kna1-name1,
vbeln TYPE likp-vbeln,
wbsta TYPE vbup-wbsta,
text(25) TYPE c,
lfgsa TYPE vbup-lfgsa,
kwmeng TYPE vbap-kwmeng,
netwr TYPE likp-netwr,
order TYPE vbak-vbeln,
posnr TYPE vbap-posnr,
matnr TYPE mara-matnr,
netwr1 TYPE vbak-netwr,
kwmeng1 TYPE vbap-kwmeng,
kwmeng2 TYPE vbap-kwmeng,
route TYPE vbap-route,
lifsk TYPE vbak-lifsk,
vdatu TYPE vbak-vdatu,
END OF ty_final.
DATA : i_final TYPE STANDARD TABLE OF ty_final.
DATA : w_final LIKE LINE OF i_final.
DATA : i_final1 TYPE STANDARD TABLE OF ty_final.
DATA : w_final1 LIKE LINE OF i_final1.
TYPES : BEGIN OF ty_final2,
lddat TYPE likp-lddat,
werks TYPE vbap-werks,
bzirk TYPE knvv-bzirk,
bztxt TYPE t171t-bztxt,
kunnr TYPE vbak-kunnr,
name1 TYPE kna1-name1,
vbeln TYPE likp-vbeln,
wbsta TYPE vbup-wbsta,
text(25) TYPE c,
lfgsa TYPE vbup-lfgsa,
kwmeng TYPE vbap-kwmeng,
netwr TYPE likp-netwr,
order TYPE vbak-vbeln,
posnr TYPE vbap-posnr,
matnr TYPE mara-matnr,
netwr1 TYPE vbak-netwr,
kwmeng1 TYPE vbap-kwmeng,
kwmeng2 TYPE vbap-kwmeng,
vdatu TYPE vbak-vdatu,
maktx TYPE makt-maktx,
END OF ty_final2.
DATA : i_final2 TYPE STANDARD TABLE OF ty_final2.
DATA : w_final2 LIKE LINE OF i_final2.
DATA : i_conwa TYPE STANDARD TABLE OF vbco6 WITH HEADER LINE.
DATA : i_vbfa_tab TYPE STANDARD TABLE OF vbfa WITH HEADER LINE.
DATA : opt TYPE ctu_params.
DATA : v_vbeln TYPE vbak-vbeln.
DATA : w_vbeln TYPE vbak-vbeln.
DATA : v_repid TYPE sy-repid.
DATA : v_netwr TYPE vbak-netwr.
DATA : v_kwmeng TYPE vbap-kwmeng.
DATA : v_netwr1 TYPE vbak-netwr.
DATA : v_kwmeng1 TYPE vbap-kwmeng.
DATA : v_time(60) TYPE c.
DATA : v_plant(60) TYPE c.
DATA : v_date(60) TYPE c.
DATA : v_lfart(60) TYPE c.
DATA : v_auart(60) TYPE c.
DATA : v_mod(2) TYPE c.
DATA : name(10).
DATA : v_indexes TYPE sy-index.
DATA : v_text(40) TYPE c.
DATA : v_total TYPE p DECIMALS 2.
DATA : v_total1(60) TYPE c.
DATA : v_totqt TYPE p DECIMALS 2.
****Constants Declaration********************************
CONSTANTS : c_wbstaa TYPE vbup-wbsta VALUE 'A',
c_wbstab TYPE vbup-wbsta VALUE 'B',
c_wbstac TYPE vbup-wbsta VALUE 'C',
c_lfartlf TYPE likp-lfart VALUE 'LF',
c_lfartlr TYPE likp-lfart VALUE 'LR',
c_lfartlo TYPE likp-lfart VALUE 'LO',
c_lfartzlo TYPE likp-lfart VALUE 'ZLO',
c_lfgsaa TYPE vbup-lfgsa VALUE 'A',
c_lfgsab TYPE vbup-lfgsa VALUE 'B',
c_vbtyp_nj TYPE vbfa-vbtyp_n VALUE 'J',
c_vbtyp_nt TYPE vbfa-vbtyp_n VALUE 'T',
c_vbtyp_nm TYPE vbfa-vbtyp_n VALUE 'M',
c_vbtyp_vh TYPE vbfa-vbtyp_v VALUE 'H',
c_1100 TYPE t001w-werks VALUE '1100',
c_1101 TYPE t001w-werks VALUE '1101'.
****Selection Screen Declaration*************************
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE title.
SELECT-OPTIONS : s_werks FOR t001w-werks OBLIGATORY.
SELECT-OPTIONS : s_lddat FOR likp-lddat.
SELECT-OPTIONS : s_auat FOR vbak-auart DEFAULT 'OR'.
SELECT-OPTIONS : s_lfat FOR likp-lfart DEFAULT 'LF'.
SELECT-OPTIONS : s_vbeln FOR vbep-vbeln NO-DISPLAY.
SELECT-OPTIONS : s_posnr FOR vbep-posnr NO-DISPLAY.
SELECTION-SCREEN : END OF BLOCK b1.
****Initialization***************************************
INITIALIZATION.
v_repid = sy-repid.
title = 'Selection Screen Options'.
s_werks-sign = 'I'.
s_werks-option = 'EQ'.
s_werks-low = c_1100.
s_werks-high = c_1101.
APPEND s_werks.
CALL FUNCTION 'OIUREP_MONTH_FIRST_LAST'
EXPORTING
i_date = sy-datum
IMPORTING
e_first_day = s_lddat-low
e_last_day = s_lddat-high.
s_lddat-sign = 'I'.
s_lddat-option = 'EQ'.
APPEND s_lddat TO s_lddat.
****At selection screen on field*************************
AT SELECTION-SCREEN ON s_werks.
SELECT SINGLE * FROM t001w WHERE werks IN s_werks.
IF sy-subrc <> 0.
MESSAGE 'Please enter correct Plant' TYPE 'E'.
ENDIF.
AT SELECTION-SCREEN ON s_lddat.
AT SELECTION-SCREEN ON s_auat.
SELECT SINGLE * FROM tvak WHERE auart IN s_auat.
IF sy-subrc <> 0.
MESSAGE 'Please enter correct Sales Doc Type' TYPE 'E'.
ENDIF.
AT SELECTION-SCREEN ON s_lfat.
SELECT SINGLE * FROM tvlk WHERE lfart IN s_lfat.
IF sy-subrc <> 0.
MESSAGE 'Please enter correct Delv Doc Type' TYPE 'E'.
ENDIF.
****Start selection of data from tables based on cond****
PERFORM SALESORDER_HEADER_ITEM.
PERFORM CUSTOMER_SALESDATA.
START-OF-SELECTION.
PERFORM delivery_header_item.
PERFORM salesdocument_itemstatus.
PERFORM salesdocument_schedulelinedata.
PERFORM salesdocument_itemstatus_lfgsa.
PERFORM sales_district.
PERFORM delivery_salesdocument_wbsta.
PERFORM salesdocumentflow.
PERFORM billingdoc_header_item.
PERFORM salesorder_header_item2.
PERFORM customer_salesdata1.
PERFORM delivery_output.
PERFORM salesdoc_shdlnitem_itemstatus.
PERFORM salesorder_header_item1.
PERFORM customer_salesdata2.
PERFORM salesorder_output.
PERFORM material_descriptions.
PERFORM final_output.
END-OF-SELECTION.
****Fieldcatalog Routine for ALVGRID******************
PERFORM fieldcatalog.
****Event Routine for ALVGRID*************************
PERFORM build_header CHANGING v_header v_header1.
PERFORM build_events CHANGING v_events.
PERFORM print_build.
****Layout Routine for ALVGRID************************
PERFORM layout_build.
****Grid_display Routine for ALVGRID******************
PERFORM grid_display.
*& Form fieldcatalog
text
--> p1 text
<-- p2 text
FORM fieldcatalog .
wa_fieldcat-tabname = 'I_FINAL1'.
wa_fieldcat-fieldname = 'LDDAT'.
wa_fieldcat-seltext_m = 'Loading Dt'.
wa_fieldcat-key = ' '. "SUBTOTAL KEY
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-tabname = 'I_FINAL1'.
wa_fieldcat-fieldname = 'WERKS'.
wa_fieldcat-seltext_m = 'Plant'.
wa_fieldcat-key = ' '. "SUBTOTAL KEY
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-tabname = 'I_FINAL1'.
wa_fieldcat-fieldname = 'BZIRK'.
wa_fieldcat-seltext_m = 'Sales Dist'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-tabname = 'I_FINAL1'.
wa_fieldcat-fieldname = 'BZTXT'.
wa_fieldcat-seltext_m = 'Name of Dist'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-tabname = 'I_FINAL1'.
wa_fieldcat-fieldname = 'KUNNR'.
wa_fieldcat-seltext_m = 'Customer No.'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-tabname = 'I_FINAL1'.
wa_fieldcat-fieldname = 'NAME1'.
wa_fieldcat-seltext_m = 'Customer Name'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-tabname = 'I_FINAL1'.
wa_fieldcat-fieldname = 'VBELN'.
wa_fieldcat-seltext_m = 'Delivery No.'.
wa_fieldcat-key = ' '. "SUBTOTAL KEY
wa_fieldcat-hotspot = 'X'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-tabname = 'I_FINAL1'.
wa_fieldcat-fieldname = 'WBSTA'.
wa_fieldcat-seltext_m = 'Delv Status'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-tabname = 'I_FINAL1'.
wa_fieldcat-fieldname = 'TEXT'.
wa_fieldcat-seltext_m = 'Status Desc'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-tabname = 'I_FINAL1'.
wa_fieldcat-fieldname = 'KWMENG'.
wa_fieldcat-seltext_m = 'Delivery Qty'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-tabname = 'I_FINAL1'.
wa_fieldcat-fieldname = 'NETWR'.
wa_fieldcat-seltext_m = 'Delv Net Value'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-tabname = 'I_FINAL1'.
wa_fieldcat-fieldname = 'ORDER'.
wa_fieldcat-seltext_m = 'Sales Order'.
wa_fieldcat-hotspot = 'X'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-tabname = 'I_FINAL1'.
wa_fieldcat-fieldname = 'KWMENG1'.
wa_fieldcat-seltext_m = 'Order Qty'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-tabname = 'I_FINAL1'.
wa_fieldcat-fieldname = 'NETWR1'.
wa_fieldcat-seltext_m = 'Sales Net Value'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-tabname = 'I_FINAL1'.
wa_fieldcat-fieldname = 'LIFSK'.
wa_fieldcat-seltext_m = 'Delv Block'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-tabname = 'I_FINAL1'.
wa_fieldcat-fieldname = 'ROUTE'.
wa_fieldcat-seltext_m = 'Route'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-tabname = 'I_FINAL1'.
wa_fieldcat-fieldname = 'VDATU'.
wa_fieldcat-seltext_m = 'Req Delivery Dt'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
CLEAR gs_sort.
gs_sort-fieldname = 'LDDAT'.
gs_sort-spos = 1.
gs_sort-up = 'X'.
gs_sort-subtot = 'X'.
APPEND gs_sort TO gt_sort.
ENDFORM. " fieldcatalog
*& Form print_build
text
--> p1 text
<-- p2 text
FORM print_build .
w_print-no_print_listinfos = 'X'.
ENDFORM. " print_build
*& Form layout_build
text
--> p1 text
<-- p2 text
FORM layout_build .
w_layout-zebra = 'X'.
w_layout-no_vline = ''.
w_layout-colwidth_optimize = 'X'.
w_layout-detail_popup = 'X'.
w_layout-detail_initial_lines = 'X'.
w_layout-detail_titlebar = 'Detail Title Bar'.
ENDFORM. " layout_build
*& Form GRID_DISPLAY
text
FORM grid_display.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_callback_user_command = 'PROCESS_USER_COMMANDS'
is_layout = w_layout
it_fieldcat = i_fieldcat[]
it_sort = gt_sort[]
i_default = 'X'
i_save = 'A'
it_events = v_events
is_print = w_print
TABLES
t_outtab = i_final1
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. "GRID_DISPLAY
*& Form END_OF_LIST
FORM top_of_list.
ENDFORM. "TOP_OF_LIST
*& Form PROCESS_USER_COMMANDS
text
-->SYST-UCOMM text
-->SELFIELD text
FORM process_user_commands USING syst-ucomm LIKE syst-ucomm
selfield TYPE slis_selfield.
CASE syst-ucomm.
WHEN '&IC1'.
IF selfield-sel_tab_field = 'I_FINAL1-VBELN'.
w_vbeln = selfield-value.
SET PARAMETER ID: 'VL' FIELD w_vbeln.
CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
ELSEIF selfield-sel_tab_field = 'I_FINAL1-ORDER'.
v_vbeln = selfield-value.
SET PARAMETER ID: 'AUN' FIELD v_vbeln.
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
ELSE.
READ TABLE i_final1 INTO w_final1 INDEX selfield-tabindex.
IF w_final1-vbeln <> ' '.
LOOP AT i_final INTO w_final WHERE vbeln = w_final1-vbeln.
READ TABLE i_makt INTO w_makt WITH KEY matnr = w_final-matnr .
IF sy-subrc = 0.
MOVE : w_final TO w_final2.
MOVE : w_makt-maktx TO w_final2-maktx.
APPEND w_final2 TO i_final2.
ELSE.
MOVE : w_final TO w_final2.
MOVE : ' ' TO w_final2-maktx.
APPEND w_final2 TO i_final2.
ENDIF.
ENDLOOP.
CLEAR w_makt.
ELSE.
LOOP AT i_final INTO w_final WHERE order = w_final1-order.
READ TABLE i_makt INTO w_makt WITH KEY matnr = w_final-matnr .
IF sy-subrc = 0.
MOVE : w_final TO w_final2.
MOVE : w_makt-maktx TO w_final2-maktx.
APPEND w_final2 TO i_final2.
ELSE.
MOVE : w_final TO w_final2.
MOVE : ' ' TO w_final2-maktx.
APPEND w_final2 TO i_final2.
ENDIF.
ENDLOOP.
CLEAR w_makt.
ENDIF.
PERFORM fieldcatalog1 USING selfield .
PERFORM event_build.
PERFORM layout_build1.
PERFORM grid_display1.
ENDIF.
ENDCASE.
ENDFORM. " PROCESS_USER_COMMANDS
*& Form fieldcatalog1
text
--> p1 text
<-- p2 text
FORM fieldcatalog1 USING r_selfield TYPE slis_selfield.
REFRESH tbl_fieldcat1.
READ TABLE i_final1 INTO w_final1 INDEX r_selfield-tabindex.
IF w_final1-vbeln <> ' '.
PERFORM write_fieldcat1 USING 'POSNR' 'I_FINAL2' 'Item Number' ' ' 2 ' ' ' '
PERFORM write_fieldcat1 USING 'MATNR' 'I_FINAL2' 'Material Number' ' ' 3 ' ' ' '
PERFORM write_fieldcat1 USING 'MAKTX' 'I_FINAL2' 'Material Description' ' ' 4 ' ' ' '
PERFORM write_fieldcat1 USING 'KWMENG' 'I_FINAL2' 'Delivery Qty' ' ' 7 ' ' ' '
PERFORM write_fieldcat1 USING 'NETWR' 'I_FINAL2' 'Delv Net Value' ' ' 8 ' ' ' '
ELSE.
PERFORM write_fieldcat1 USING 'POSNR' 'I_FINAL2' 'Item Number' ' ' 2 ' ' ' '
PERFORM write_fieldcat1 USING 'MATNR' 'I_FINAL2' 'Material Number' ' ' 3 ' ' ' '
PERFORM write_fieldcat1 USING 'MAKTX' 'I_FINAL2' 'Material Description' ' ' 4 ' ' ' '
PERFORM write_fieldcat1 USING 'KWMENG2' 'I_FINAL2' 'Sales Order Qty' ' ' 9 ' ' ' '
PERFORM write_fieldcat1 USING 'NETWR1' 'I_FINAL2' 'Net Value' ' ' 10 ' ' ' '
ENDIF.
ENDFORM. " fieldcatalog1
*& Form write_fieldcat1
text
-->NAME text
-->TAB text
-->ST text
-->KEY text
-->POS text
-->LENGTH text
-->ICON text
-->HOT text
FORM write_fieldcat1 USING name tab st key pos length icon hot.
st_fieldcat1-fieldname = name.
st_fieldcat1-tabname = tab.
st_fieldcat1-seltext_m = st.
st_fieldcat1-key = key.
st_fieldcat1-col_pos = pos.
st_fieldcat1-outputlen = length.
st_fieldcat1-icon = icon.
st_fieldcat1-do_sum = hot.
APPEND st_fieldcat1 TO tbl_fieldcat1.
CLEAR st_fieldcat1.
ENDFORM. " WRITE_FIELDCAT
*& Form GRID_DISPLAY1
text
--> p1 text
<-- p2 text
FORM grid_display1 .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
it_fieldcat = tbl_fieldcat1
is_layout = st_layout1
it_events = i_events[]
TABLES
t_outtab = i_final2
EXCEPTIONS
program_error = 1
OTHERS = 2.
REFRESH i_final2.
ENDFORM. " GRID_DISPLAY1
*& Form LAYOUT_BUILD1
text
FORM layout_build1 .
st_layout1-zebra = 'X'.
st_layout1-no_vline = ''.
st_layout1-colwidth_optimize = 'X'.
st_layout1-detail_popup = 'X'.
st_layout1-detail_initial_lines = 'X'.
st_layout1-detail_titlebar = 'Detail Title Bar'.
ENDFORM. " layout_build
*& Form salesdocument_itemstatus
text
--> p1 text
<-- p2 text
FORM salesdocument_itemstatus .
CLEAR i_vbup.
REFRESH i_vbup.
v_indexes = 10.
v_text = 'Processing... Sales Doc Item'.
PERFORM progress_ind.
IF NOT i_likp_lips[] IS INITIAL.
SELECT vbeln
posnr
lfsta
wbsta
FROM vbup INTO TABLE i_vbup
FOR ALL ENTRIES IN i_likp_lips
WHERE vbeln = i_likp_lips-vbeln
AND posnr = i_likp_lips-posnr
AND wbsta IN (c_wbstaa, c_wbstab, c_wbstac).
ENDIF.
SORT i_vbup BY vbeln posnr.
ENDFORM. " salesdocument_itemstatus
*& Form delivery_header_item
text
--> p1 text
<-- p2 text
FORM delivery_header_item .
CLEAR i_likp_lips.
REFRESH i_likp_lips.
v_indexes = 1.
v_text = 'Processing.. Delivery'.
PERFORM progress_ind.
selected data from delivery header and delivery iten based on loading date and plant
based on document types LF LR LO ZLO.
SELECT a~vbeln
a~vkorg
a~lfart
a~lddat
a~vbtyp
a~kunnr
a~anzpk
a~netwr
a~werks
b~posnr
b~matnr
b~matkl
b~werks
b~lfimg
b~vrkme
b~vgbel
b~vtweg
b~spart
b~netwr
INTO TABLE i_likp_lips
FROM likp AS a INNER JOIN lips AS b
ON avbeln = bvbeln
WHERE a~lfart IN s_lfat
AND a~lddat IN s_lddat
AND b~werks IN s_werks.
%_HINTS ORACLE 'index("Z05" "Z05LFART" "Z05LDDAT")'.
DELETE i_likp_lips WHERE lfart NOT IN s_lfat
OR lddat NOT IN s_lddat
OR lipswerks NOT IN s_werks.
SORT i_likp_lips BY vbeln posnr.
ENDFORM. " delivery_header_item
*& Form SalesDocument_ScheduleLineData
text
--> p1 text
<-- p2 text
FORM salesdocument_schedulelinedata .
CLEAR i_vbep.
REFRESH i_vbep.
v_indexes = 15.
v_text = 'Processing.. Sales Doc Sch Line Data'.
PERFORM progress_ind.
*SELECTED from table vbep based on loading date, this selection will fetch all
*the open sales orders.
SELECT vbeln
posnr
wmeng
lddat
FROM vbep
INTO TABLE i_vbep
WHERE vbeln in s_vbeln
and posnr in s_posnr
and lddat IN s_lddat.
DELETE I_VBEP WHERE LDDAT NOT IN S_LDDAT.
SORT i_vbep BY vbeln posnr.
ENDFORM. " SalesDocument_ScheduleLineData
*& Form salesdocument_itemstatus_lfgsa
text
--> p1 text
<-- p2 text
FORM salesdocument_itemstatus_lfgsa .
CLEAR i_vbup1.
REFRESH i_vbup1.
v_indexes = 20.
v_text = 'Processing... Sales Doc Item'.
PERFORM progress_ind.
selected from vbup for all entries of vbep based on respective salesorder and item number
and lfgsa status equals to A AND B.
IF NOT i_vbep[] IS INITIAL.
SELECT vbeln posnr lfgsa wbsta FROM vbup INTO TABLE i_vbup1 FOR ALL ENTRIES IN i_vbep
WHERE vbeln = i_vbep-vbeln
AND posnr = i_vbep-posnr
AND LFGSA IN (C_LFGSAA, C_LFGSAB).
%_HINTS ORACLE 'index("ZS1" "ZS1~LFGSA")'.
ENDIF.
DELETE i_vbup1 WHERE lfgsa <> c_lfgsaa AND lfgsa <> c_lfgsab.
SORT i_vbup1 BY vbeln posnr.
ENDFORM. " salesdocument_itemstatus_lfgsa
*& Form billingdoc_header_item
text
--> p1 text
<-- p2 text
FORM billingdoc_header_item .
CLEAR i_vbrk_vbrp.
REFRESH i_vbrk_vbrp.
v_indexes = 40.
v_text = 'Processing... Billing'.
PERFORM progress_ind.
*SELECTED INVOICE DETAILS FROM VBRK AND VBRP .
IF NOT I_VBFA1[] IS INITIAL.
SELECT AVBELN AFKART AFKTYP AVBTYP AWAERK ANETWR
BPOSNR BFKIMG BVRKME BUMVKZ BUMVKN BNETWR
INTO TABLE I_VBRK_VBRP FROM VBRK AS A INNER
JOIN VBRP AS B ON AVBELN = BVBELN FOR ALL ENTRIES IN I_VBFA1
WHERE A~VBELN = I_VBFA1-VBELN AND
B~POSNR = I_VBFA1-POSNN.
ENDIF.
SORT I_VBRK_VBRP BY VBELN POSNR VRKME.
ENDFORM. " billingdoc_header_item
*& Form sales_district
text
--> p1 text
<-- p2 text
FORM sales_district .
CLEAR i_t171t.
REFRESH i_t171t.
v_indexes = 22.
v_text = 'Processing... Sales District'.
PERFORM progress_ind.
*TO SELECT THE SALES DISTRICT FROM I171T.
SELECT * FROM t171t INTO TABLE i_t171t WHERE spras = 'EN'.
ENDFORM. " sales_district
*& Form Material_Descriptions
text
--> p1 text
<-- p2 text
FORM material_descriptions .
DATA : i_fin TYPE STANDARD TABLE OF ty_final WITH HEADER LINE.
CLEAR i_makt.
REFRESH i_makt.
PERFORM progress_ind.
i_fin[] = i_final[].
SORT i_fin BY matnr.
DELETE ADJACENT DUPLICATES FROM i_fin COMPARING matnr.
THIS STATEMENT IS USED TO SELECT MATERIAL DESCRIPTIONS BASED ON THE MATERIAL NUMBERS
PRESENT IN THE FINAL INTERNAL TABLE.
IF NOT i_fin[] IS INITIAL.
SELECT matnr maktx FROM makt INTO TABLE i_makt FOR ALL ENTRIES IN i_fin WHERE spras = 'EN'
AND matnr = i_fin-matnr.
ENDIF.
SORT i_makt BY matnr.
ENDFORM. " Material_Descriptions
*& Form delivery_salesdocument_wbsta
text
--> p1 text
<-- p2 text
This routine will helps us to combine delivery data and sales document item status
FORM delivery_salesdocument_wbsta .
CLEAR i_output.
REFRESH i_output.
v_indexes = 30.
v_text = 'Processing... Open Delivery'.
PERFORM progress_ind.
LOOP AT i_likp_lips INTO w_likp_lips.
READ TABLE i_vbup INTO w_vbup WITH KEY vbeln = w_likp_lips-vbeln
posnr = w_likp_lips-posnr BINARY SEARCH.
IF sy-subrc = 0.
MOVE-CORRESPONDING w_likp_lips TO w_output.
MOVE : w_vbup-lfsta TO w_output-lfsta.
MOVE : w_vbup-wbsta TO w_output-wbsta.
APPEND w_output TO i_output.
ENDIF.
ENDLOOP.
SORT i_output BY vbeln posnr.
ENDFORM. " delivery_salesdocument_wbsta
*& Form salesdocumentflow
text
--> p1 text
<-- p2 text
FORM salesdocumentflow .
CLEAR i_vbfa.
REFRESH i_vbfa.
CLEAR i_vbfa1.
REFRESH i_vbfa1.
v_indexes = 35.
v_text = 'Processing... Sales Doc Flow'.
PERFORM progress_ind.
THIS STATEMENT IS USED TO SELECT THE ORDER NUMBERS BASED ON DELIVERY NUMBERS
FROM SALES DOCUMENT FLOW TABLE.
IF NOT I_OUTPUT[] IS INITIAL.
SELECT VBELV POSNV VBELN POSNN VBTYP_N RFMNG VBTYP_V INTO TABLE I_VBFA FROM VBFA
FOR ALL ENTRIES IN I_OUTPUT WHERE VBELN = I_OUTPUT-VBELN
AND POSNN = I_OUTPUT-POSNR
AND VBTYP_N IN (C_VBTYP_NJ, C_VBTYP_NT).
SELECT VBELV POSNV VBELN POSNN RFMNG RFWRT FROM VBFA INTO TABLE I_VBFA1 FOR ALL ENTRIES IN
I_OUTPUT WHERE VBELV = I_OUTPUT-VBELN
AND POSNV = I_OUTPUT-POSNR
AND VBTYP_N = C_VBTYP_NM.
ENDIF.
SORT I_VBFA BY VBELN POSNN.
SORT I_VBFA1 BY VBELN POSNN.
ENDFORM. " salesdocumentflow
*& Form salesdoc_shdlnitem_itemstatus
text
--> p1 text
<-- p2 text
FORM salesdoc_shdlnitem_itemstatus .
CLEAR i_vbep_vbup.
REFRESH i_vbep_vbup.
v_indexes = 70.
v_text = 'Processing... Order'.
PERFORM progress_ind.
*TO COMBINE THE VBUP DATA WITH STATUS OF LFGSA EQ TO A AND B WITH
*DATA OF VBEP , WHERE WE GET DATA OF VBEP BASED ON LOADING DATE
IF NOT i_vbup1 IS INITIAL.
LOOP AT i_vbup1 INTO w_vbup1.
READ TABLE i_vbep INTO w_vbep WITH KEY vbeln = w_vbup1-vbeln
posnr = w_vbup1-posnr BINARY SEARCH.
IF sy-subrc = 0.
MOVE : w_vbep-vbeln TO w_vbep_vbup-vbeln,
w_vbep-posnr TO w_vbep_vbup-posnr,
w_vbep-wmeng TO w_vbep_vbup-wmeng,
w_vbep-lddat TO w_vbep_vbup-lddat,
w_vbup1-lfgsa TO w_vbep_vbup-lfgsa,
w_vbup1-wbsta TO w_vbep_vbup-wbsta.
APPEND w_vbep_vbup TO i_vbep_vbup.
ENDIF.
ENDLOOP.
ENDIF.
SORT i_vbep_vbup BY vbeln posnr.
DELETE ADJACENT DUPLICATES FROM i_vbep_vbup COMPARING vbeln posnr.
ENDFORM. " salesdoc_shdlnitem_itemstatus
*& Form delivery_output
text
--> p1 text
<-- p2 text
*This routine will give us all the deliveries which are open or closed with
*there respective delivered quantity and amount etc.
FORM delivery_output .
CLEAR i_final.
REFRESH i_final.
v_indexes = 65.
v_text = 'Processing... Deliver'.
PERFORM progress_ind.
IF NOT i_output[] IS INITIAL.
LOOP AT i_output INTO w_output.
REFRESH i_vbfa_tab.
IF W_OUTPUT-LFART = C_LFARTLF OR W_OUTPUT-LFART = C_LFARTLO OR W_OUTPUT-LFART = C_LFARTZLO.
READ TABLE I_VBFA INTO W_VBFA WITH KEY VBELN = W_OUTPUT-VBELN
POSNN = W_OUTPUT-POSNR BINARY SEARCH .
ELSEIF W_OUTPUT-LFART = C_LFARTLR.
IF W_OUTPUT-VBTYP = 'J'.
READ TABLE I_VBFA INTO W_VBFA WITH KEY VBELN = W_OUTPUT-VBELN
POSNN = W_OUTPUT-POSNR BINARY SEARCH.
ELSE.
READ TABLE I_VBFA INTO W_VBFA WITH KEY VBELN = W_OUTPUT-VBELN
POSNN = W_OUTPUT-POSNR
Maybe you are looking for
-
A665-s6056, windows 7 64, and a 32 bit windows?
Hi, I've just purchased a Satellite A665-s6056 which is preinstalled with Windows 7 64 bit. I'd like to be able to use a 32 bit Windows OS as well. I'm wondering if I can install a Windows 7 32 bit system or a Windows XP 32 bit system alongside the
-
Hello, I want to select a link in a sql query. I create a report with the following sql query select ' '||'<a href=www.nu.nl /a>' link from dualwhen i run the page I do not get a link to the www address. If I look at the source the sourve is like thi
-
Installed windows 7 on macbook but im having a few problems...
I decided to install windows on my macbook since i want to play games and it is restricted in macbook... So i installed windows 7 ultimate 32 bit, but i can't open the games i installed because of some directx problem, it literally says that i should
-
Apple Mail with defunct smtp trying to display 800 alerts or so
Apple Mail, after upgrading to Maverick, now tries to display > 800 alerts for automatic mail forwards that it apparently now cannot send because of some issue I probably have to troubleshoot. It deadlocks to that behavior, too, so each time I force
-
IMPORT FROM MEMORY in job submitted program
Hi experts, In a method I do: SUBMIT zemr0044 USER sy-uname VIA JOB lc_jobname NUMBER lv_jobcount AND RETURN. Before this submit I have done: IMPORT ls_header = ls_header FROM DAT