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: 

how to extend a existing BAPI?

Former Member
0 Kudos

Hi,

I am using a BAPI BAPI_MATERIAL_MAINTAINDATA_RT. I am using the sales data part of it using the Structure BAPIE1MVKERT. Now i have added few Z-fields to the structure BAPIE1MVKERT. How to extend the BAPI BAPI_MATERIAL_MAINTAINDATA_RT now?

What all i should take care of in this?

Thanks in Advance!

Thanks & Regards,

Amirth

1 ACCEPTED SOLUTION

venkatesan_nagiah
Active Participant
0 Kudos

Hi,

You also need to extend structure MVKE_UEB and automatically the fields will be populated in the tables.

5 REPLIES 5

venkatesan_nagiah
Active Participant
0 Kudos

Hi,

You also need to extend structure MVKE_UEB and automatically the fields will be populated in the tables.

0 Kudos

Hi Venkatesan,

Thanks for the reply. I have already extended the structure MVKE_UEB.

But how should i pass the Z-field data to the bapi BAPI_MATERIAL_MAINTAINDATA_RT, so that it can update those fields in MVKE table. It would be helpful, if you can assist me on this.

Thanks,

Amirth

0 Kudos

Hi Amrita,

There is a parameter SALESEXT with structure BAPIE1MVKEEXTRT.

You pass the values in the salesext-FIELD1 in the same order without condensing.

And one more structure SALESEXTX where you pass the value 'X' for each field in the FIELD1.

You also fill the material FUNCTION, MATERIAL, SALES_ORG, DISTR_CHAN of each structure.

If length of FIELD1 is not sufficient, then you can use FIELD2 and FIELD3, FIELD4.

Also you need to code user exit EXIT_SAPL1001_003 to transfer the field in the respective structure. ie move the custom fields into structure F_MARC_UEB. (as u already extended MARU_UEB structure.

Apart from this you need to maintain table T130F. You can maintain in SE16. The sample values are:

FNAME = MARA-ZZCUS1 (for example name of the customer field)

FGRUP = 211 (Field group 211 to 240 possible)

PSTAT = EDVKALBQPSZXCFG

KZREF = X

FGROU = GR_GLOB

Edited by: Venkatesan Nagiah on Apr 22, 2009 12:39 PM

0 Kudos

Hi Venkatesan,

Thank you very much!

The issue got solved by the above way.

Also i have coded in exit_003 to populate the fields into MVKE.

Thanks for your inputs.

Regards,

Amirth

Former Member
0 Kudos

Hi Amritha,

see the Bapi extension in us


DATA : t_bapiparex TYPE STANDARD TABLE OF bapiparex,                                                         "Ref. structure for BAPI parameter ExtensionIn/ExtensionOut
       w_bapiparex LIKE bapiparex.

    w_bapiparex-structure = 'BAPE_VBAP'.
    CONCATENATE t_vbap-vbeln t_vbap-posnr 'ZA' INTO w_bapiparex-valuepart1.


  CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
      salesdocument               = w_vbeln1
      order_header_inx            = w_bapisdh1x
    TABLES
      return                      = t_bapiret2[]
      order_item_in               = t_bapisditm
      order_item_inx              = t_bapisditmx

      extensionin                 = t_bapiparex.   "<<Pass your extension fill data

regards,

Prabhhdas