cancel
Showing results for 
Search instead for 
Did you mean: 

Personas 3.0 Script Function call not returning Results

Iheanyi
Explorer
0 Kudos

Hi,

I have written a script with a function call and it is not returning any values.

This is the code.

var rfc = session.createRFC("BAPI_EQUI_GETDETAIL");

rfc.setParameter("EQUIPMENT", "10000080");

rfc.requestResults(JSON.stringify(["DATA_GENERAL_EXP", "RETURN"]));

rfc.send();

var equipment = JSON.parse(rfc.getResult("DATA_GENERAL_EXP"));

session.utils.log(equipment.OBJECTTYPE);

I have also maintained the rfc in the FM whitelist

What i'm i doing wrong?

Accepted Solutions (0)

Answers (2)

Answers (2)

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

It's the leading zeroes... the equipment number is a 18 CHAR field, so you have to specify the equipment number like "000000000010000080"

Iheanyi
Explorer

Problem resolved.. leading zeros solved the problem

Iheanyi
Explorer
0 Kudos

I have tested the Function module in se37 and it works but it still wont return values in personas script