2014 Dec 10 12:13 PM
Hi,
Please help me for below issue:
I am using bapi BAPI_PRODORDCONF_CREATE_TT to confirmation for production order For Tcode- co11n.
But facing issue with messages as below mention:
Previously in RFC function module BDC were used.
So it was giving error message with
Messages class RU and number 110:
Confirmation saved (Goods movements: 1, failed: 0)
But when I am using BAPI instead of BDC it is giving only message
Confirmation of order 1357…. Saved.
In BAPI I am passing parameters:
ls_timeticket-orderid = g_aufnr. " Order
ls_timeticket-operation = g_vornr. " Order Item
ls_timeticket-fin_conf = g_endru.
ls_timeticket-pers_no = g_pernr.
ls_timeticket-clear_res = g_ausor.
IF g_menge CS '.'.
REPLACE '.' WITH ',' INTO g_menge.
ENDIF.
ls_timeticket-yield = g_menge.
APPEND ls_timeticket TO lt_timeticket.
* user is valid and authorized: call bapi to generate
* confirmation for production order
CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_TT'
EXPORTING
post_wrong_entries = l_post_wrong_entries
testrun = l_testrun
IMPORTING
return = ls_bapi_return
TABLES
timetickets = lt_timeticket
goodsmovements = lt_goodsmovements
link_conf_goodsmov = lt_link_conf_goods_mov
detail_return = lt_detail_return
EXCEPTIONS
error_message = 1.
IF lt_detail_return IS NOT INITIAL.
*** Commit
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF.
Thanks,
Priyanka Soni
Thanks Klaus
But how can I get error message when we are executing bapi it will capture error message or message like: Confirmation of order 1357…. Saved but message should be come with goods movement like: Confirmation saved (Goods movements: 1, failed: 0).
2014 Dec 10 12:47 PM
Hi,
please check in function module CO_RU_CONF_POST using break-point. There both messages RU100 and RU110 are close together:
WHEN OTHERS.
MESSAGE s100 WITH l_aufnr.
ENDCASE.
ELSE.
IF gprot_flg IS INITIAL AND NOT flg_fkt IS INITIAL.
MESSAGE i110 WITH cnt_retro_ok tmp_retro_err.
ELSE.
MESSAGE s110 WITH cnt_retro_ok tmp_retro_err.
The code should be look like above. The reason fore the different messages should be found before this code or in the interface parameters.
Regards,
Klaus
2014 Dec 11 8:20 AM
Thanks Klaus
But how can I get error message when we are executing bapi it will capture error message or message like: Confirmation of order 1357…. Saved but message should be come with goods movement like: Confirmation saved (Goods movements: 1, failed: 0).
2014 Dec 11 8:37 AM
Hi,
you can prepare your BAPI data in SE37 test mode (F8). I know, it's a little bit time-consuming to prepare your test data, but nevertheless it's the best way to check the behavior of the BAPI. Set a break-point at the beginning of fm CO_RU_CONF_POST, check all fm parameters and the run of the fm.
Regards,
Klaus
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |