‎2013 Jan 09 9:35 AM
Hello.
I am trying start a process in new task calling module function 'ABAP4_CALL_TRANSACTION' using the addition "starting new task".
My problems is I don't know how can I get parameters in the new process, because I don't know how use the tables of this function, nor access to memory abap (I'm trying with "export/import memory id" and "set/get parameter", but either works because the IDs are unaccessible in the new task, are empty).
Any idea to do that?
Thanks.
‎2013 Jan 09 9:54 AM
Thanks, was quite easy:
DATA lt_spagpa_tab TYPE STANDARD TABLE OF rfc_spagpa.
DATA ls_spagpa_tab TYPE rfc_spagpa.
ls_spagpa_tab-PARID = 'MEMORY_ID'.
ls_spagpa_tab-PARVAL = 'VALUE'.
append ls_spagpa_tab to lt_spagpa_tab.
CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'TEST'
EXPORTING
tcode = 'NEW_PROCESS'
TABLES
spagpa_tab = lt_spagpa_tab
EXCEPTIONS
call_transaction_denied = 1
tcode_invalid = 2
OTHERS = 3.
In NEW_PROCESS:
DATA: MEMORY_ID(5).
GET PARAMETER ID 'MEMORY_ID' FIELD MEMORY_ID.
Then, MEMORY_ID will have the value 'VALUE'.
‎2013 Jan 09 9:41 AM
hi,
goto SE37 and put the function module name and find the inputs parameter's and tables. test with sample dictionary.
Read the documentation for the function module .
hope it will help.
Vinoth.
‎2013 Jan 09 9:46 AM
Parameter names are explicit, use table parameter SPAGPA_TAB to pass values of MEMORY ID, you could also pass data like in a CALL TRANSACTION with a structure BDCDATA in table parameter USING_TAB. Those FM are widely used in ECC, perform a where-used, check a small report like FI_DUPLICATE_INVOICE_SHOW.
Regards,
Raymond
‎2013 Jan 09 9:49 AM
Hi,
Refer to link
http://help.sap.com/abapdocu_70/en/ABAPCALL_FUNCTION_STARTING.htm
Use import / export of memory ID's in addition to DATABASE INDEX.
Thanks,
Tooshar Bendale
‎2013 Jan 09 9:54 AM
Thanks, was quite easy:
DATA lt_spagpa_tab TYPE STANDARD TABLE OF rfc_spagpa.
DATA ls_spagpa_tab TYPE rfc_spagpa.
ls_spagpa_tab-PARID = 'MEMORY_ID'.
ls_spagpa_tab-PARVAL = 'VALUE'.
append ls_spagpa_tab to lt_spagpa_tab.
CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'TEST'
EXPORTING
tcode = 'NEW_PROCESS'
TABLES
spagpa_tab = lt_spagpa_tab
EXCEPTIONS
call_transaction_denied = 1
tcode_invalid = 2
OTHERS = 3.
In NEW_PROCESS:
DATA: MEMORY_ID(5).
GET PARAMETER ID 'MEMORY_ID' FIELD MEMORY_ID.
Then, MEMORY_ID will have the value 'VALUE'.