11-03-2015 10:30 AM
Hi Experts,
I want to change master material data (plan price (field mbew-zplp1) in transaction MD04
with help of function module BAPI_MATERIAL_SAVEDATA.
The problem for me is the mapping of the import parameters with
when not only a single field is set but a structure.
Under
please see attached Graphic1.png
I found an example which has also a structure as import parameter
Above Method JSON-stringify is used. I tried to reproduce it in our system.
But unfortunately it is not working because of 2 reasons.
I could simulate this writing a small ABAP-Programm which is calling the function module.
Without “COMMIT WORK”-Statement at the end of the program the FM is not updating.
How can I handle this in the script.
What not logical is that the content of field FIRSTNAME is between ‘’ and the content of field LASTNAME is between “”.
Further I debugged (screenshot below) and found out that the script is also transferring the fieldnames not only
the data to the structure. So the function module is going to fail. Could you please help me with
the syntax in the javascript, that the fields of the structure are populated correctly ?
Thanks a lot.
please see attached Graphic2.png
Regards Jürgen
11-03-2015 2:48 PM
You could call the FM BAPI_TRANSACTION_COMMIT right after BAPI_MATERIAL_SAVEDATA.
11-03-2015 8:50 PM
11-03-2015 8:52 PM
11-04-2015 12:58 PM
Hi Tamas,
I implemented it and it did work.
Thanks a lot. Have you got a proposal how to assign
values from Javascript to an ABAP Structure ?.
If I do in example mentioned before it won't work,
cause fieldname would also be assigned to the import
structure. How is the correct syntax in JS that ABAP
can assign the received values to the required fields
of the structure ?
I could only do it with a workaround where I build a
big string and assign the values to the particular offset.
But this is very uncomfortable and error-prone.
Thanks for your help. Regards Juergen.
11-04-2015 8:50 PM
Hi Jurgen,
There is currently some work going on for passing structure from personas script.
I would suggest you to create a css message so that you can be informed when the note is out.
OR
wait for our support mail when the note is out
(http://support.personas.help)
Sushant
11-04-2015 9:00 PM
11-04-2015 9:04 PM
11-07-2015 10:25 PM
It means creating an incident. Go to the SAP Support Portal (https://support.sap.com) and click on 'Report an incident'.
11-09-2015 6:53 AM