Skip to Content
0

Submit ZREPORT with parameter and need to catch messages table

Dec 22, 2016 at 12:43 PM

50

avatar image

Hi everyone,

i have 2 functions and 1 report. One of functions is creating customer, other one is creating vendor.

My customer wanted that ' when they create a customer , report will submit and create a vendor with same values(lifnr = kunnr). I called my report in end of customer function if customer created succesfully with this code block;

IF ls_kna1-ktokd EQ 'KYNK'.

CLEAR i_kunnr.
i_kunnr = ls_customers-header-object_instance-kunnr.
 SUBMIT zfip_pers_customer_check USING SELECTION-SET ''
 WITH p_kunn EQ i_kunnr
 EXPORTING LIST TO MEMORY AND RETURN.
ENDIF.

And in my report i'm getting all informations of created customer. Then i'm calling my function which creating 'Vendor'. This function returning to me a messaged table like bapiret2. like;

 CALL FUNCTION 'ZENT_VENDOR_CREATE_MASTER'
          EXPORTING
            ls_lfa1       = ls_lfa1
          IMPORTING
            tb_message    = tb_message
            tb_vendor     = tb_vendor
          TABLES
            tb_lfb1       = tb_lfb1
*           tb_lfm1       =
*           tb_wyt3       =
            tb_lfbk       = tb_lfbk
*           tb_lfbw       =
            tb_adrc       = tb_adrc
            tb_bapiadsmtp = tb_bapiadsmtp.

Now i need to get 'tb_message' table after submit program. Is that possible? If it is, how?

blablabla

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Horst Keller
Dec 22, 2016 at 12:47 PM
1

Parameter passing between submitted programs can be done with EXPORT/IMPORT TO/FROM MEMORY.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thank you.

0