‎2010 Jan 19 4:38 AM
Hi All,
I have a requirement where in i have to call a standard transaction from my modulepool program and return the value from the standard transaction to my program.
Suppose if i call change customer master or creates sales order transactions from my module pool program, i want to know which customer has been changed or which sales order has been created. Pls let me know how to solve this.
Thanks,
Raju
‎2010 Jan 19 5:10 AM
Hello,
These fields have a parameter id, use it as it will hold the value of the last changed value.
Say for a sales order the parameter id is AUN, so after the call transaction when you return to your module pool program us the GET PARAMETER ID statement to fetch the value of the changed sales order from the id AUN into a variable.
No the variable holds the value of the last changed order.
Hope this solves your issue.
Regards,
Sachin
‎2010 Jan 19 4:56 AM
Hi,
Just use statement CALL TRANSACTION 'Tcode' and check the variable sy-msgv1 after you returned back. It will contain the object key of the called transaction if it is successfully saved.
Other way could be, CALL TRANSACTION 'Tcode' USING bdcdata MODE 'E' MESSAGES INTO bdcmessages.
In bdcdata populate the screen data only for first screen. From messages tab you can get the object key. Ideally this should work fine.
Thanks,
Vinod.
‎2010 Jan 19 5:10 AM
Hello,
These fields have a parameter id, use it as it will hold the value of the last changed value.
Say for a sales order the parameter id is AUN, so after the call transaction when you return to your module pool program us the GET PARAMETER ID statement to fetch the value of the changed sales order from the id AUN into a variable.
No the variable holds the value of the last changed order.
Hope this solves your issue.
Regards,
Sachin
‎2010 Jan 19 5:20 AM
Hi
Please refer the code mentioned below:
FORM USER_COMMAND USING F_UCOMM LIKE SY-UCOMM
I_SELFIELD TYPE SLIS_SELFIELD.
DATA: F_SUBRC LIKE SY-SUBRC,
s_arseg like tab_arseg.
READ TABLE tab_arseg INDEX i_selfield-tabindex INTO s_arseg.
CASE F_UCOMM.
WHEN '&IC1'.
CASE i_SELFIELD-SEL_TAB_FIELD.
WHEN 'TAB_ARSEG-BELNR'.
CHECK NOT S_ARSEG-BELNR IS INITIAL.
SET PARAMETER ID 'RBN' FIELD S_ARSEG-BELNR.
SET PARAMETER ID 'GJR' FIELD S_ARSEG-GJAHR.
CALL TRANSACTION 'MIR4' AND SKIP FIRST SCREEN.
Give the parameter id of field name whose changes value , you want to capture.This is just an example
GET PARAMETER ID 'RBN' field gd_valueout.
ENDCASE.
ENDCASE.
ENDFORM.