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

Facing message issue for BAPI_PRODORDCONF_CREATE_TT

Former Member
2,472

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

3 REPLIES 3
Read only

Former Member
0 Likes
1,493

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

Read only

0 Likes
1,493

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

Read only

0 Likes
1,493

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