Application Development 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: 

CS_BI_BOM_CREATE_BATCH_INPUT1 only one item is created

0 Kudos
447

I have a problem using the FM CS_BI_BOM_CREATE_BATCH_INPUT1

When i call the FM  only the last item will be created and i don't know why.

I suppose that something is wrong with the parameters durcing the FM-Call.

As i have seen this Problem is often mentioned but no one has given any solution-hint yet.

Here is my Call of the FM. (First Call from ABAP)

********

form Aufruf.

    CALL FUNCTION 'CS_BI_BOM_CREATE_BATCH_INPUT1'

      EXPORTING

   BDC_FLAG           = 'X'

        BOM_HEADER         = etab

      CLOSE_GROUP        = ' '

      COMMIT_WORK        = 'X'

        group_data         = mpdat

       NEW_GROUP          = 'X'

       TCODE_MODE         = 'N'

       TCODE_UPDATE       = 'S'

* IMPORTING

*   MSGID              =

*   MSGNO              =

*   MSGTY              =

*   MSGV1              =

*   MSGV2              =

*   MSGV3              =

*   MSGV4              =

      TABLES

        BOM_ITEM           = ktab               " this is the compeletely filled ITEM-Tab

        BOM_SUB_ITEM       = subi          " this one is empty becaus whe have no sub-Items

              .

                                                                                                                                                                                                                                                                                                                                                                                                                                                          clear etab[].      " Delete before the next Transacktion in Batch-Input starts

    clear ktab[].       "  before the next Transacktion in Batch-Input starts

endform.

***********************

After the BI-File is created i call the FM for the following transaction like this:

form folgeaufruf.

*  If lauf ne 0.

    CALL FUNCTION 'CS_BI_BOM_CREATE_BATCH_INPUT1'

      EXPORTING

   BDC_FLAG           = 'X'

        BOM_HEADER         = etab

       CLOSE_GROUP        = 'X'

       COMMIT_WORK        = 'X'

        group_data         = mpdat

       NEW_GROUP          = ' '

       TCODE_MODE         = 'N'

       TCODE_UPDATE       = 'S'

* IMPORTING

*   MSGID              =

*   MSGNO              =

*   MSGTY              =

*   MSGV1              =

*   MSGV2              =

*   MSGV3              =

*   MSGV4              =

      TABLES

        BOM_ITEM           = ktab

        BOM_SUB_ITEM       = subi

              .

    clear etab[]. "löschen Tabellen vor nächster Stückliste

    clear ktab[]. "Löschen Tabellen vor nächster Stückliste

*  endif.

endform.

***************

Has anyone an idea to solve this ?

2 REPLIES 2

former_member198900
Participant
0 Kudos
82

Hi,

It is very late reply but this is for others.

I keep for all items Xline fields same. in this way I solved mine.

BOM_ITEM-XLINE = '0001'

Regards,

Rupom

0 Kudos
82

Thanks, Its works