02-23-2012 4:15 AM
Hi all,
I am using BAPI_MATERIAL_SAVEDATA to create a material.
this BAPI is in a loop, internal table have 4 records with different material numbers and all other data is same.
data is for BASIC and SALEs views.
For fist record it is created data for basic and sales views
for second record it is created only basic view
for third record it is created data for basic and sales views
for fourth record it is created only basic view
Am i missing any thing to pass? why it is creating only basic view for second and fourth records?
i have debugged, data is same except material no for every loop.
i am using commit work and wait for every loop. also tried to use after completion of loop but no change in result
Please help me.
Thanks in advance.
Best records,
Venu.
02-23-2012 5:57 AM
Venu,
Material view creation depends on Material type.
check the possible views allowed for the material type( i.e for 2nd row of internal table).
02-23-2012 4:28 AM
02-23-2012 5:43 AM
Hi Thank you for reply.
FORM f_call_fm_mm TABLES tt_return "Error return
USING ps_mm_wa TYPE y88t_armat
pv_bukrs "Company code
pv_chart_acc "Chart of accounts
pv_sector "Industry sector
pv_status.
*
ENDFORM. " F_CALL_FM_MM
02-23-2012 4:54 AM
Hi venu Gopal,
Check the importing and table parameters which are ending with 'X' these parameter are set to 'X' then only they update.
check whether at end of the loop u may write any clear statement or not.
The Example Parameters ends with 'X' is PLANTDATAX,PLANNINGDATAX,STORAGELOCATIONDATAX
Regards
Siva
02-23-2012 5:57 AM
Venu,
Material view creation depends on Material type.
check the possible views allowed for the material type( i.e for 2nd row of internal table).
02-23-2012 6:51 AM
Hi Jeevan,
Thank you for your reply, it's correct depends on material type.
For second and fourth record other views are not available.
Thank you.
04-19-2012 2:41 PM
Hi All,
In BAPI "BAPI_MATERIAL_SAVEDATA"
to pass below Parameters also:
In Client-specific material data
clientdat-MATL_GROUP = gs_bapimaterial-matkl.
clientdat-BASE_UOM = gs_bapimaterial-meins.
clientdat-BASE_UOM_ISO = gs_bapimaterial-meins.
In information on Update for Clientdata.
clientdatax-MATL_GROUP = 'X'.
clientdatax-base_uom = 'X'.
clientdatax-base_uom_iso = 'X'.
After call 'BAPI_MATERIAL_SAVEDATA'
IF RETURN-TYPE = 'S' .
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
ELSEIF RETURN-TYPE = 'E' .
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK' .
ENDIF .
It will work fine.