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

Problem with BAPI_PRODORDCONF_CREATE_TT

Former Member
0 Kudos
3,537

This BAPI is to "Enter Time Ticket Confirmation".

Regularly we use transaction CO11N to do this. This standard transaction creates just ONE Goods Movements for each order confirmation. And in table AFRU in the field WABLNR this transaction saves the "Number of Material Document".

When I register the order confirmation with this BAPI, it creates TWO Goods Movements.

The first for: "Goods receipt for order into warehouse".

And the secod: "GI for order" and "Receipt by-product"

This BAPI doesn't generates value for "Number of Material Document" in AFRU-WABLNR, this because there are two movements.

I think the BAPI is working fine, although it is creating two movements. However I have an Infocube that is working with the value of AFRU-WABLNR. And I don't know if something else works with this value.

What I need is the BAPI creates just one Material Document (not two). What do I have to do?

Thanks in advance.

-


In the ABAP program I use this values of the structure BAPI_PP_TIMETICKET:


   wa_tickets-ORDERID             = p_ord.
   wa_tickets-OPERATION           = p_pos.
   wa_tickets-FIN_CONF            = p_fin.
   wa_tickets-POSTG_DATE          = p_postg.
   wa_tickets-CONF_TEXT           = p_conf.
   wa_tickets-PLANT               = p_plant.
   wa_tickets-WORK_CNTR           = p_work.
   wa_tickets-CONF_QUAN_UNIT      = p_confq.
   wa_tickets-YIELD               = p_yield.
   wa_tickets-CONF_ACTI_UNIT1     = p_unt1.
   wa_tickets-CONF_ACTI_UNIT1_ISO = p_unt1i.
   wa_tickets-CONF_ACTIVITY1      = p_act1.
   wa_tickets-CONF_ACTI_UNIT2     = p_unt2.
   wa_tickets-CONF_ACTI_UNIT2_ISO = p_unt2i.
   wa_tickets-CONF_ACTIVITY2      = p_act2.
   wa_tickets-CONF_ACTI_UNIT3     = p_unt3.
   wa_tickets-CONF_ACTI_UNIT3_ISO = p_unt3i.
   wa_tickets-CONF_ACTIVITY3      = p_act3.
   wa_tickets-CONF_ACTI_UNIT4     = p_unt4.
   wa_tickets-CONF_ACTI_UNIT4_ISO = p_unt4i.
   wa_tickets-CONF_ACTIVITY4      = p_act4.
   wa_tickets-EXEC_START_DATE     = p_stad.
   wa_tickets-EXEC_START_TIME     = p_stat.
   wa_tickets-EXEC_FIN_DATE       = p_find.
   wa_tickets-EXEC_FIN_TIME       = p_fint.

After I asign the values I do:

 
CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_TT'
 EXPORTING
*   POST_WRONG_ENTRIES       = '0'
    TESTRUN                  = ''
  IMPORTING
    RETURN                   = itab_return
  TABLES
    TIMETICKETS              = itab_tickets
    GOODSMOVEMENTS           = itab_GOODSMOVEMENTS "Empty
    LINK_CONF_GOODSMOV       = itab_LINK_CONF_GOODSMOV "Empty
    DETAIL_RETURN            = itab_log.

At the end I have one order confirmation and two good movements.

Edited by: Alejandro Picado Elizondo on Feb 27, 2008 9:35 AM

3 REPLIES 3
Read only

Former Member
0 Kudos
1,323

I am facing the same issue. How did you fix it?

Read only

1,323

Hi,

In order to create single material document number using BAPI_PRODORDDCONF_CREATE_TT  you need to link all goods movement for an order using table parameter LINK_CONF_GOODSMOV-INDEX_GM_DEPEND.


For example -

Order1 - 0001000001

For 101 entries, LINK_CONF_GOODSMOV-INDEX_GM_DEPEND = ‘1’.

For 261 entries, LINK_CONF_GOODSMOV-INDEX_GM_DEPEND = ‘1’.

For 531 entries, LINK_CONF_GOODSMOV-INDEX_GM_DEPEND = ‘1’.

Order2 - 0001000002

For 101 entries, LINK_CONF_GOODSMOV-INDEX_GM_DEPEND = ‘2’.

For 261 entries, LINK_CONF_GOODSMOV-INDEX_GM_DEPEND = ‘2’.

For 531 entries, LINK_CONF_GOODSMOV-INDEX_GM_DEPEND = ‘2’.

Regards,

Rampreet Jaiswal

Read only

494

Hi Rampreet Jaiswal, I know this was 9 years ago but this saved me from my issue so thank you!

In my case, I was using BAPI_PROCORDCONF_GET_HDR_PROP to accurately populate BAPI_PROCORDCONF_CREATE_HDR to replicate the confirmation behavior in CORK while linking the existing components to the new material document.

In BAPI_PROCORDCONF_GET_HDR_PROP, INDEX_GM_DEPEND was listed as '0' so I didn't think to populate that with values so I kept getting a material document without the listed components. I wasn't able to find any more documentation, but I was able to come across your comment and tried it and it addressed the issue correctly. 

Thanks again!