2008 Jul 09 1:09 PM
Hi ,
i used Bathc input method ,after that i have to display success and failure records details , so how we can do this,
can anyone pls tell me with example .
THX
Hi ,
i used Bathc input method ,after that i have to display success and failure records details , so how we can do this,
can anyone pls tell me with example .
THX
2008 Jul 09 1:14 PM
Hi,
if you are using the call transaction method in BDC, the error or success messages will be stored in table BDCDATA...(here IT_BDCDATA)
see the sample code below:
Start of Selection
START-OF-SELECTION.
BDC recording for ME22 : Update line item qty : MENGE field
PERFORM bdc_start USING 'SAPMM06E' '0105'.
PERFORM bdc_proc USING 'BDC_CURSOR' 'RM06E-BSTNR'.
PERFORM bdc_proc USING 'BDC_OKCODE' '/00'.
PERFORM bdc_proc USING 'RM06E-BSTNR' '4500050023'.
PERFORM bdc_start USING 'SAPMM06E' '0120'.
PERFORM bdc_proc USING 'BDC_CURSOR' 'EKPO-MENGE(01)'.
PERFORM bdc_proc USING 'BDC_OKCODE' '=BU'.
PERFORM bdc_proc USING 'RM06E-EBELP' '10'.
PERFORM bdc_proc USING 'EKPO-MENGE(01)' p_qty.
PERFORM bdc_start USING 'SAPLSPO1' '0300'.
PERFORM bdc_proc USING 'BDC_OKCODE' '=YES'.
Call the transaction
CALL TRANSACTION 'ME22' USING it_bdcdata MODE 'A' MESSAGES IT_BDCDATA.
******************************
loop at it_bdcdata.
Process or display messages
endloop.
****************************
&----
*& Form BDC_START
&----
text
----
-->P_SNAM text
-->P_SVAL text
----
FORM bdc_start USING p_snam
p_sval.
wa_bdcdata-program = p_snam.
wa_bdcdata-dynpro = p_sval.
wa_bdcdata-dynbegin = 'X'.
APPEND wa_bdcdata TO it_bdcdata.
CLEAR wa_bdcdata.
ENDFORM. " BDC_START
&----
*& Form BDC_PROC
&----
text
----
-->P_FNAM text
-->P_FVAL text
----
FORM bdc_proc USING p_fnam
p_fval.
wa_bdcdata-fnam = p_fnam.
wa_bdcdata-fval = p_fval.
wa_bdcdata-dynbegin = 'X'.
APPEND wa_bdcdata TO it_bdcdata.
CLEAR wa_bdcdata.
ENDFORM. " BDC_PROC
Reward if useful
Regards
Shiva
2008 Jul 09 1:24 PM
sir ,
what is i clearly mentioned na it is in Batch input method again ur telling abt call transaction methos ...
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |