Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Screen Personas:Scripting with RFC-Functionmodules: Problems with Import-Structure

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

http://wiki.scn.sap.com/wiki/display/Img/How+to+call+Remote+Enabled+ABAP+Function+Modules+in+Personas+3.0

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.

  1. The function module is not working without a “COMMIT WORK” at the end.

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.

  1. Something seems to be wrong (syntax?) in the Method JSON-stringify.

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

Graphic1.png (20287 B)
Graphic2.png (55672 B)
Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question