EXTENSIONIN confusion [RESOLVED]

Question: Hi there.

Could someone please explain how to fill in additional fields into EXTENSIONIN/EXTENSIONINX in BAPI_MATERIAL_SAVEDATA?

I need to add MARA-BRGEW (Gross Weight) when creating a material, and I'm just not understanding the examples found on this website and others I've found. I get the declaration, but when it comes to filling values into VALUEPART1/2/3/4 - I'm just not understanding.

Thank you

Answer:
I remember I found this a bit confusing. I've only used it for custom fields for POs, but the method should be the same.

1. Add the new fields to the BAPI_TE_* table extension structures related to your table. For EKKO these are BAPI_TE_MEPOHEADER and BAPI_TE_MEPOHEADERX; the FM help should tell you which ones you should use.

2. Define structures for these structures and for the BAPI table structures in your program.
DATA:
  gw_data  TYPE bapi_te_mepoheader,
  gw_datax TYPE bapi_te_mepoheaderx,
  gt_extn  TYPE TABLE OF bapiparex,
  gw_extn  TYPE bapiparex.

3. Fill the BAPI_TE_MEPO* structures. The first structure holds the values for each field, the second holds flags indicating which fields should be updated.
gw_data-po_number = SPACE.
gw_data-zzattachment = gw_header-attachment_flag.
gw_data-zcode = gw_header-proj_officer.

gw_datax-po_number = SPACE.
gw_datax-zzattachment = 'X'.
gw_datax-zcode = 'X'.


4. Add these structures to the BAPI tables structures.
gw_extn-structure = 'BAPI_TE_MEPOHEADER'.
gw_extn-valuepart1 = gw_data.
APPEND gw_extn TO gt_extn.

gw_extn-structure = 'BAPI_TE_MEPOHEADERX'.
gw_extn-valuepart1 = gw_datax.
APPEND gw_extn TO gt_extn.


Since this is a small set of fields I am using only VALUEPART1. If you had a lot of data I guess you would also use the other VALUEPART fields.
_________________
Using SAP R/3 version 4.7 BASIS 6.20 under SunOS on an Oracle 10.2.0.2.0 database

Answer:
That rocks!

Thank you SO much!

Answer:
...and of course, I couldn't get that to work!

But I was able to pass the Gross Weight into the UOM conversion area, and the data got pushed into the Basic Data 1 tab.
In case anyone is curious, I did this:


  T_UOM-ALT_UNIT = 'EA'.
  T_UOM-ALT_UNIT_ISO = 'EA'.
  T_UOM-NUMERATOR = '1'.
  T_UOM-DENOMINATR = '1'.
  T_UOM-GROSS_WT = P_WEIGHT.
  T_UOM-UNIT_OF_WT = 'LB'.
  T_UOM-VOLUME = P_CUBE.
  T_UOM-VOLUMEUNIT = 'FT3'.

  APPEND T_UOM.

  CLEAR T_UOM.


I also did the same in the UOMX table, but keep in mind that the ALT_UNIT needs to remain at 'EA' (or whatever the Base UOM is). Then I filled the remaining Sales and Purchasing UOM(s) into T_UOM.

Thanks for the reply christmaslights, and to RosieBrent for not instantly deleting my profile when I PM'd her!
Copyright ?2007 - 2008 www.jt77.com