Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Process in new task

Former Member
0 Likes
2,157

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,345

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'.

4 REPLIES 4
Read only

vinoth_aruldass
Contributor
0 Likes
1,345

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.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,345

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

Read only

Former Member
0 Likes
1,345

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

Read only

Former Member
0 Likes
1,346

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'.