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 EXTENSION for VBKD

former_member404270
Discoverer
0 Kudos
6,344

Hi Experts,

I am using BAPI 'BAPI_SALESORDER_CHANGE' for updating VBKD custom field. As I learned that extension structure( EXTENSIONIN) can accommodate only up to 960 characters , I have a custom field in VBAKKOM structure located at 259 index past 1500 characters. I cannot modify the structure VBAKKOM also. Please let me know if there is any way I can use the BAPI to update my custom field in VBKD table.

Thank you,

Vikas

6 REPLIES 6
Read only

Former Member
4,922

You can export the data using a FM (and storing the same in the global variable of the FM) and call the FM inside MV45AFZZ to update the custom fields.

Thanks,

Vikram.M

Read only

0 Kudos
4,922

Hi Vikram,

Thank you for the response.

I am sorry I didn't mention that I am using the BAPI in a custom report and I should refrain from doing any changes to SAPMV45A. My question still stands the same , since I want to use BAPI extension only.

Thanks,

Vikas

Read only

0 Kudos
4,922

Vikas Chandrawal wrote:

I should refrain from doing any changes to SAPMV45A.

Using the user exit MV45AFZZ is not modification to SAPMV45A since this user exit will not be modified by SAP.

Are you saying that you have so many Z fields within the sales order that its past the 960 chars of the extension structure?

Read only

0 Kudos
4,922

Yes,there are around 280 fields in VBAKKOM  structure and the field I want to use is at index 259 , that's way beyond 960 characters.

Read only

0 Kudos
4,922

If your requirement is ONLY to use the extensionin parameter of the interface, how do you update the other fields using this option?

Read only

0 Kudos
3,653

It works.  Do a enhancement within FORM USEREXIT_MOVE_FIELD_TO_VBKD, then import zfield  from memeory.

 

  DATA:
        lt_zsd_so_vbkd_zfield TYPE STANDARD TABLE OF zsd_so_vbkd_zfield.
  IMPORT lt_zsd_so_vbkd_zfield FROM MEMORY ID 'ZSD_SO_VBKD_ZFIELD'.
  read table lt_zsd_so_vbkd_zfield with key posnr vbkd-posnr into data(ls_zfield).
  if sy-subrc 0.
    vbkd-ZZSDABW ls_zfield-zzsdabw.
    vbkd-ZZTDDAT ls_zfield-ZZTDDAT.
    vbkd-ZZGRKOR ls_zfield-ZZGRKOR.
    vbkd-ZZKZTLF ls_zfield-ZZKZTLF.
  endif.