on 02-04-2013 3:41 PM
Hello,
I am using the Bapi BAPI_INB_DELIVERY_CHANGE to change the quantity of an item.
That’s work fine.
My problem is that I need to change the field LIPS-GRUND.
This Field does not exist in the structure ITEM_DATA.
But I don’t know how to use the Structure EXTENSION2 and I can`t find any documentation, threads here in the forum or solutions about this.
When I call the Bapi with this data, the bapi will change my quantity, but not the LIPS-GRUND.
ls_EXTENSION2-PARAM = 'LIPS-GRUND'. " The field i will change
ls_EXTENSION2-ROW = 1. " The first item
ls_EXTENSION2-field = 'LIPS-GRUND'. " The field i will change
ls_EXTENSION2-VALUE = ls_dyn110-grund. " The Value "0001"
ls_EXTENSION2-type = 'NUMC'. " TYPE NUMC
ls_EXTENSION2-LENGTH = 4. " 4
APPEND ls_EXTENSION2 to lt_EXTENSION2.
Does anyone know how to use this extension?
Thanks and greetings from Germany
dear andreas,
Below is sample scenario:
I want to add two custom fields in VBAK at time of Quotation creation.
data declaration:
DATA: lt_extensionin TYPE STANDARD TABLE OF bapiparex ,
lt_extensionex TYPE STANDARD TABLE OF bapiparex ,
wa_extensionin TYPE bapiparex,
wa_extensionex TYPE bapiparex .
DATA: wa_bape_vbak TYPE bape_vbak,
wa_bape_vbakx TYPE bape_vbakx.
First include two fields in VBAK table by append structure.
wa_bape_vbak-zfield1 = 'Text1'.
wa_bape_vbak-zfield2 = 'Text2'.
wa_extensionin-structure = 'BAPE_VBAK'.
wa_extensionin+30(960) = wa_bape_vbak.
APPEND wa_extensionin TO lt_extensionin.
wa_bape_vbakx-zfield1 = 'X'.
wa_bape_vbakx-zfield2 = 'X'.
wa_extensionex-structure = 'BAPE_VBAKX'.
wa_extensionex+30(960) = wa_bape_vbakx.
APPEND wa_extensionex TO lt_extensionin. "<-- this is required.
APPEND wa_extensionex TO lt_extensionex.
CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
TABLES
extensionin = lt_extensionin[]
extensionex = lt_extensionex[]
from above coding, whenever Quotation is created, automatically two fields will get populated in VBAK table.
regards
goudham
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear goudham,
i can`t use the structure of "wa_extensionin TYPE bapiparex," for Bapi BAPI_INB_DELIVERY_CHANGE. The fields i need to change are SAP Fileds (LIPS-GRUND) and not Z-Fileds.
This is the Answer of my Problem:
In the transaction VL31N the fields LIPS-GRUND and LIPS-INSMK are dependent with a modification, because the field INSMK is in sap default not changeable.
In the BAPI i can fill the LIPS-INSMK field, so that i change the LIPS-GRUND in the VL32N modification.
regards
Andreas
Hi, Andreas
I have requirement to change stock type (lips-insmk) field. I tried bapi but it is not working.. In your post you mentioned that you were filling this LIPS-INSMK field in BAPI. Can you tell me which fields in header and item table you passed to bapi so it will update stock type also. Item control table in this bapi don't have flag for this stock type field. so which flag you passed in Item control table to updated this stock type.
Thanks
Hi Aakash Patel,
i had solved the problem to move the logic in the Userexit ...SAVE_PREPARE...
regards
Andreas
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.