2009 Mar 17 4:52 AM
Hi ,
i have a customised transaction zc10 where in iam executing this to update co01 with list of orders , for each order this zc10 is being executed using call transaction and messages were displayed
now my requirement is to develop a new program that can take the file with orders and load to co01 through zc10 .i have written the code but iwas unable to fetch the messages that were displayed by zc10 is there a way to fectch those messages into my program and diplay as output.here is the code
LOOP AT tbl_infile into wa_infile.
move wa_infile-budat to v_datum .
concatenate v_datum0(2) '.' v_datum2(2) '.' v_datum+4(4)
into wa_infile-budat.
DATA:count type i.
PERFORM FILL_ORDER_DETAILS.
CLEAR: T_BDC_MESSAGES[].
REFRESH: T_BDC_MESSAGES[].
CALL TRANSACTION 'ZC10' USING t_bdc MODE 'A' UPDATE 'S' MESSAGES
INTO T_BDC_MESSAGES.
CLEAR WA_INFILE.
clear T_BDC_MESSAGES.
CLEAR TBL_INFILE.
CLEAR T_BDC.
REFRESH T_BDC.
ENDLOOP.
PERFORM add_bdc_screen USING
'ZCII_MAZZA_ORDER_CONFIRMATION' '1000'.
PERFORM add_bdc_field USING:
'BDC_CURSOR' 'P_STP_MN',
'BDC_OKCODE' '=ONLI',
'P_AUFNR' wa_infile-AUFNR,
'P_DATUV' wa_infile-BUDAT,
'P_CONF' 'X',
'P_SH_MAD' wa_infile-TUBES,
'P_SH_ROL' wa_infile-SRAP,
'P_BATCH' wa_infile-BATCHES,
'P_MAC_HR' wa_infile-RUNMIN,
'P_STP_MN' wa_infile-STOPMIN.
PERFORM add_bdc_screen USING
'SAPMSSY0' '0120'.
PERFORM add_bdc_field USING:
'BDC_OKCODE' '=%EX'.
PERFORM add_bdc_screen USING
'ZCII_MAZZA_ORDER_CONFIRMATION' '1000'.
PERFORM add_bdc_field USING:
'BDC_OKCODE' '=/EENDE',
'BDC_CURSOR' 'P_AUFNR'.
ENDFORM. " FILL_ORDER_DETAILS
2009 Mar 17 4:55 AM
Hi,
Read the table T_BDC_MESSAGES after the statement CALL TRANSACTION.
Regards,
Prakash Pandey
Hi ,
i have a customised transaction zc10 where in iam executing this to update co01 with list of orders , for each order this zc10 is being executed using call transaction and messages were displayed
now my requirement is to develop a new program that can take the file with orders and load to co01 through zc10 .i have written the code but iwas unable to fetch the messages that were displayed by zc10 is there a way to fectch those messages into my program and diplay as output.here is the code
LOOP AT tbl_infile into wa_infile.
move wa_infile-budat to v_datum .
concatenate v_datum0(2) '.' v_datum2(2) '.' v_datum+4(4)
into wa_infile-budat.
DATA:count type i.
PERFORM FILL_ORDER_DETAILS.
CLEAR: T_BDC_MESSAGES[].
REFRESH: T_BDC_MESSAGES[].
CALL TRANSACTION 'ZC10' USING t_bdc MODE 'A' UPDATE 'S' MESSAGES
INTO T_BDC_MESSAGES.
CLEAR WA_INFILE.
clear T_BDC_MESSAGES.
CLEAR TBL_INFILE.
CLEAR T_BDC.
REFRESH T_BDC.
ENDLOOP.
PERFORM add_bdc_screen USING
'ZCII_MAZZA_ORDER_CONFIRMATION' '1000'.
PERFORM add_bdc_field USING:
'BDC_CURSOR' 'P_STP_MN',
'BDC_OKCODE' '=ONLI',
'P_AUFNR' wa_infile-AUFNR,
'P_DATUV' wa_infile-BUDAT,
'P_CONF' 'X',
'P_SH_MAD' wa_infile-TUBES,
'P_SH_ROL' wa_infile-SRAP,
'P_BATCH' wa_infile-BATCHES,
'P_MAC_HR' wa_infile-RUNMIN,
'P_STP_MN' wa_infile-STOPMIN.
PERFORM add_bdc_screen USING
'SAPMSSY0' '0120'.
PERFORM add_bdc_field USING:
'BDC_OKCODE' '=%EX'.
PERFORM add_bdc_screen USING
'ZCII_MAZZA_ORDER_CONFIRMATION' '1000'.
PERFORM add_bdc_field USING:
'BDC_OKCODE' '=/EENDE',
'BDC_CURSOR' 'P_AUFNR'.
ENDFORM. " FILL_ORDER_DETAILS
2009 Mar 17 4:55 AM
Hi,
Read the table T_BDC_MESSAGES after the statement CALL TRANSACTION.
Regards,
Prakash Pandey
2009 Mar 17 5:05 AM
Donot :clear T_BDC_MESSAGES.
It will hold all the messages.
You can use T_BDC_MESSAGES to get the list.
Regards,
gurpreet