‎2009 May 20 8:06 AM
Hi Experts,
I have a requirement to process 3 transactions F-29, VA01 and F-32 in a program 1 after another.
So i tried like this.
call TRANSACTION 'F-29'.
call TRANSACTION 'VA01'.
call TRANSACTION 'F-32'.
This is working and posting also done correctly.
But problem is whenever i am clicking back button at any screen of program it should go to initial screen, i.e, F-29 initial screen.
But in my case if i m pressing back button while i am in F-29 screen, its going to VA01 initial screen and if back button is pressed in VA01, its going to F-32 screen.
Is there any possibilities to capture 'BACK' in Sy-UCOMM?
Please Suggest
Thanks in Advance
Lucky
‎2009 May 20 8:19 AM
check this
[http://www.sapfans.com/forums/viewtopic.php?f=13&t=9971]
Just for reference SAP note 941500 addresses this issue
Edited by: Safel007 on May 20, 2009 12:51 PM
‎2009 May 20 8:09 AM
‎2009 May 20 8:19 AM
check this
[http://www.sapfans.com/forums/viewtopic.php?f=13&t=9971]
Just for reference SAP note 941500 addresses this issue
Edited by: Safel007 on May 20, 2009 12:51 PM
‎2009 May 20 8:20 AM
Hi,
CASE sy-ucomm
when 'BACK'
Call the transaction 'F-29'.
ENDCASE.
Hope this will help.
Regards
Manju
‎2009 May 20 8:26 AM
Hi,
Try using AT SELECTION-SCREEN event .Write the coding like this
AT SELECTION-SCREEN.
Case SY_UCOMM.
when 'BACK'.
write ur coding according to ur requirement.
Regards,
Lakshman.
‎2009 May 20 9:02 AM
Hi ,
Please check this code , it will resolve the issue .
CALL TRANSACTION 'F-29'.
CASE sy-ucomm.
WHEN ' ' OR 'RW'.
CALL TRANSACTION 'F-29'.
ENDCASE.
CALL TRANSACTION 'VA01'.
CASE sy-ucomm.
WHEN ' ' OR 'RW'.
CALL TRANSACTION 'F-29'.
ENDCASE.
CALL TRANSACTION 'F-32'.
CASE sy-ucomm .
WHEN ' ' OR 'RW'.
CALL TRANSACTION 'F-29'.
ENDCASE.Regards
Pinaki
‎2009 May 20 9:36 AM
Thanks Pinaki and thanks everybody.
I tried as per your suggestion.
But after pressing back button, its coming back to Z program but sy-ucomm contains nothing. I checked it by debugging that its finding nothing in sy-ucomm and going to next transaction.
‎2009 May 20 9:43 AM
Thanks Pinaki and thanks everybody.
I tried as per your suggestion.
But after pressing back button, its coming back to Z program but sy-ucomm contains nothing. I checked it by debugging that its finding nothing in sy-ucomm and going to next transaction.
‎2009 May 20 10:09 AM
Hi,
As because SY-UCOMM is initial , in case statement WHEN ' ' is checked.
Please check once please -
CALL TRANSACTION 'F-29'.
CASE sy-ucomm.
WHEN space.
CALL TRANSACTION 'F-29'.
ENDCASE.
CALL TRANSACTION 'VA01'.
CASE sy-ucomm.
WHEN space.
CALL TRANSACTION 'F-29'.
ENDCASE.Regards
Pinaki
‎2009 May 20 9:19 AM
Hi,
You can try below code..
Case sy-ucomm.
when 'RW'.
if sy-tcode = 'F-29'.
leave screen.
endif.
if sy-tcode = 'F-32'.
call TRANSACTION 'VA01'.
endif.
when 'BAC1'.
call TRANSACTION 'F-29'.
endcase.
Hope this wil help you.
Best Regards,
Deepa Kulkarni
‎2009 May 20 9:42 AM
‎2009 May 20 11:21 AM
run the below code and check
DATA: MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
call TRANSACTION 'F-29' USING BDCDATA
MESSAGES INTO MESSTAB.
if not messtab[] is initial.
refresh messtab.
call TRANSACTION 'VA01' USING BDCDATA
MESSAGES INTO MESSTAB.
if not messtab[] is initial.
refresh messtab.
call TRANSACTION 'F-32' USING BDCDATA
MESSAGES INTO MESSTAB.
endif.
endif.
Edited by: Tripat Pal Singh on May 20, 2009 3:52 PM
‎2009 May 22 11:33 AM
Hi All.
Back option is working fine. Thanks all for ur valuable suggestions.
can anybody tell how can i capture the values entered in the screen?
**********************************************************************
I tried using 'DYNP_VALUES_READ' FM like below.
DATA:
l_i_dynpfields TYPE STANDARD TABLE OF dynpread INITIAL SIZE 0,
l_wa_dynpfields TYPE dynpread,
l_carrid TYPE RF05A-NEWKO.
*Populate the Parameter Name whoso value is required
l_wa_dynpfields-fieldname = 'RF05A-NEWKO'. "Customer Account
APPEND l_wa_dynpfields TO l_i_dynpfields.
*Call the FM to read that value
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = 'SAPMF05A'
dynumb = '111'
TRANSLATE_TO_UPPER = ' '
REQUEST = ' '
PERFORM_CONVERSION_EXITS = ' '
PERFORM_INPUT_CONVERSION = ' '
DETERMINE_LOOP_INDEX = ' '
TABLES
dynpfields = l_i_dynpfields
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
invalid_parameter = 7
undefind_error = 8
double_conversion = 9
stepl_not_found = 10
OTHERS = 11
.
IF sy-subrc = 0.
*Get the value
READ TABLE l_i_dynpfields INTO l_wa_dynpfields
WITH KEY fieldname = 'RF05A-NEWKO'.
IF sy-subrc = 0.
l_carrid = l_wa_dynpfields-fieldvalue.
ENDIF.
ENDIF.
**************************************************
and also FM 'GET_DYNP_VALUE' as
*DATA : l_newko TYPE string.
*
*CALL FUNCTION 'GET_DYNP_VALUE'
*EXPORTING
*I_FIELD = 'RF05A-NEWKO'
*I_REPID = 'SAPMF05A'
*I_DYNNR = '111'
*CHANGING
*O_VALUE = l_newko.
****************************************************
But both are not able to collect values.
This is required so that account no of customer i can be used directly in 1st screen of transaction 'F-32'.
Thanks
Lucky
‎2009 May 22 12:42 PM
I don't know how to read items from screen, but of course you can get customer open items from BSIK table.
‎2009 May 25 11:48 AM
Got the solution finally taking directly from table BSEG considering posting document number.