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

BAPI_INCOMINGINVOICE_SAVE extensionin

maria_merino
Active Participant
0 Likes
3,137

Hi experts,

There is a custom field, YUUD, in an append (ZZUUID) of table RBKP.

We hace a report to create documents using bapi BAPI_INCOMINGINVOICE_SAVE  and I need to save this new field YUUD. My code is as follows:

DATA: i_extensionin TYPE TABLE OF bapiparex,
       w_extensionin LIKE LINE OF i_extensionin.

...

[fill header data]

[fill item data]

MOVE pe_factura-yuud TO wa_zzuuid-yuud.

   MOVE 'ZZUUID' TO w_extensionin-structure.
   MOVE wa_zzuuid TO w_extensionin-valuepart1.
   APPEND w_extensionin TO i_extensionin.


CALL FUNCTION 'BAPI_INCOMINGINVOICE_SAVE'
       EXPORTING
         headerdata           = headerdata
         additionalheaderdata = additionalheaderdata
         refdoccategory       = refdoccategory
*       ADDRESSDATA          =
       IMPORTING
         invoicedocnumber     = invoicedocnumber
         fiscalyear           = fiscalyear
       TABLES
*       SELECTPO             = selectpo
         selectdelivery       = selectdelivery
*       SELECTBILLLADING     =
*       SELECTSERVICE        =
*       SELECTPLANT          =
         taxdata              = itax
*       WITHTAXDATA          =
*       VENDORITEMSPLITDATA  =
         return               = return
         extensionin          = i_extensionin.

But the value is not saved into RBKP-YUUD. Is there anything wrong ? thanks in advance !


Maria

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,159

You must implement BAdI MRM_BAPI_MAPPING and map yourself your data to standard structure, but read also OSS KBA 2149315 - BAPI_INCOMINGINVOICE_CREATE and customer fields ?

Regards,

Raymond

Hi experts,

There is a custom field, YUUD, in an append (ZZUUID) of table RBKP.

We hace a report to create documents using bapi BAPI_INCOMINGINVOICE_SAVE  and I need to save this new field YUUD. My code is as follows:

DATA: i_extensionin TYPE TABLE OF bapiparex,
       w_extensionin LIKE LINE OF i_extensionin.

...

[fill header data]

[fill item data]

MOVE pe_factura-yuud TO wa_zzuuid-yuud.

   MOVE 'ZZUUID' TO w_extensionin-structure.
   MOVE wa_zzuuid TO w_extensionin-valuepart1.
   APPEND w_extensionin TO i_extensionin.


CALL FUNCTION 'BAPI_INCOMINGINVOICE_SAVE'
       EXPORTING
         headerdata           = headerdata
         additionalheaderdata = additionalheaderdata
         refdoccategory       = refdoccategory
*       ADDRESSDATA          =
       IMPORTING
         invoicedocnumber     = invoicedocnumber
         fiscalyear           = fiscalyear
       TABLES
*       SELECTPO             = selectpo
         selectdelivery       = selectdelivery
*       SELECTBILLLADING     =
*       SELECTSERVICE        =
*       SELECTPLANT          =
         taxdata              = itax
*       WITHTAXDATA          =
*       VENDORITEMSPLITDATA  =
         return               = return
         extensionin          = i_extensionin.

But the value is not saved into RBKP-YUUD. Is there anything wrong ? thanks in advance !


Maria

3 REPLIES 3
Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,160

You must implement BAdI MRM_BAPI_MAPPING and map yourself your data to standard structure, but read also OSS KBA 2149315 - BAPI_INCOMINGINVOICE_CREATE and customer fields ?

Regards,

Raymond

Read only

0 Likes
2,159

Thanks Raymon, I'll check this Badi and tell you something.

This OSS affects bapis BAPI_INCOMINGINVOICE_CREATE/BAPI_INCOMINGINVOICE_CREATE1, but I'm using BAPI_INCOMINGINVOICE_SAVE

Read only

0 Likes
2,159

Seems you sniff it right out when selecting BAPI to use