Skip to Content
avatar image
Former Member

Re: Problem to add a composition using "BAPI_BUS1077_CREATE"

Hi ,

Is there anyone to help me to resolve this problem please ?

I try to add a new substance and its composition.

But In my database only the header and the identifiers of the new substance are stored.

But not the composition.

I thnik i know where is the problem : here is the code that i think is bad.

WC_CLASSE = 'SAP_EHS_1012_003'. " Legal Composition = STD
 
 
*   prepare the PROPERTY HEADER
    REFRESH: l_prop_header_tab, l_prop_header_tab_xp.
    CLEAR l_prop_header_wa.
    l_prop_header_wa-primarykey  = 1.         "int. key
    l_prop_header_wa-flgprimkey  = true.
*   l_prop_header_wa-foreignkey  = l_sub_header_wa-primarykey.
*   l_prop_header_wa-flgfrgnkey  = l_sub_header_wa-flgprimkey.
    l_prop_header_wa-foreignkey  = l_spec_recn.     
    l_prop_header_wa-flgfrgnkey  = false            
    l_prop_header_wa-subchacat   = WC_CLASSE.
    APPEND l_prop_header_wa TO l_prop_header_tab.

In this example l_spec_recn is empty.

And probably that i need to reference the sub_header-record_no as l_prop_header_wa-foreignkey.

But how can i do all this in one time.

Do i have to do a first call to Bapi_Bus1077_create with only sub_header and after do a "bapi_bus1077_get_detail".

And retreive the record_no ?

Thanks in advance.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Apr 12, 2011 at 12:41 PM

    The error was found.

    It was the flags' value, that were "T" instead of "X".

    So it couldn't work.

    Add comment
    10|10000 characters needed characters exceeded