‎2012 Mar 29 11:18 AM
Hi all,
i created a material using bapi_material_savedata, now when im trying to change it. im getting this error "The storage location or picking area does not exist"
but when i used the get_all im getting this data..
could anyone suggest me here.
thanks & regards,
chinta
‎2012 Mar 30 9:46 AM
‎2012 Mar 29 11:24 AM
‎2012 Mar 29 11:55 AM
brother, i checked them,,,i did them correctly... i don't have any issues with that.. but still i get this error bro..
‎2012 Mar 29 12:14 PM
Hi check this,
REPORT Z_EXAMPLE_BAPI_MATERIAL_SAVEDATA.
* Data Declarations
DATA: CLIDAINP LIKE BAPI_MARA_GA,
CLIDAOUT LIKE BAPI_MARA,
CLIDAOUTX LIKE BAPI_MARAX,
HEADDATA LIKE BAPIMATHEAD,
RETURN LIKE BAPIRET2,
RETURNMES LIKE BAPI_MATRETURN2 OCCURS 0 WITH HEADER LINE.
* Get Material Number to be processed
PARAMETERS: MATERIAL LIKE BAPI_MARA_GA-MATERIAL.
* Read Material Data
CALL FUNCTION 'BAPI_MATERIAL_GET_ALL'
EXPORTING
MATERIAL = MATERIAL
IMPORTING
CLIENTDATA = CLIDAINP
TABLES
RETURN = RETURNMES.
* Header Data: Material and View to maintain
HEADDATA-MATERIAL = MATERIAL.
HEADDATA-BASIC_VIEW = 'X'.
* Detail Data: Field Value, and 'X'-Structure to mark the field for maintenance
CLIDAOUT-NET_WEIGHT = CLIDAINP-NET_WEIGHT * 2.
CLIDAOUTX-NET_WEIGHT = 'X'.
* Call the BAPI
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
HEADDATA = HEADDATA
CLIENTDATA = CLIDAOUT
CLIENTDATAX = CLIDAOUTX
IMPORTING
RETURN = RETURN
TABLES
RETURNMESSAGES = RETURNMES.
* Commit to release the locks
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
* RETURN-TYPE is 'E' in case of error, else 'S'.
IF RETURN-TYPE = 'E'.
LOOP AT RETURNMES.
WRITE: / RETURNMES-MESSAGE.
ENDLOOP.
ELSEIF RETURN-TYPE = 'S'..
WRITE: / 'Weight of material ', MATERIAL, 'Sucessfully doubled'.
ENDIF.
Regards,
madhumahesh.
‎2012 Mar 29 2:10 PM
Can you debug and see what information is getting populated in the RETURN table after calling the bapi. Any information or Warning message there while creating?
‎2012 Mar 30 9:43 AM
thank you all for your help, i did made a mistake in my code... thank you.
regards
chinta
‎2012 Mar 30 9:46 AM
‎2012 Mar 30 9:50 AM
click on correct answer whatever correct one then automatically closed thread
or
click on correct answer whatever u was posted recent one.
‎2012 Mar 30 10:10 AM
‎2012 Mar 30 10:46 AM
check below screen:
click on correct answer who was posted correct one thats all.
way of points :
Helpful answer = 5 points,
Correcet answer = 10 points and closed the thread also
like = 2 points
‎2012 Mar 30 2:44 PM
thanks but unfortunately i dont have it on my screen.
im in discussions room...
so am i in a wrong room.. i dont know. but i dont have those. in my screen
regards,
chinta