1

it's my first time using a BAPI and API to get data from an ABAP system, my problem is that I don't know how to send a specific entry (ORDER_OBJECTS) see below : these are my BAPI entries : enter image description here

and this is the ORDER_OBJECTS :

enter image description here

for now I can send the NUMBER entry, but I don't know how to send an "X" to the column 'O' (OPERATIONS) in ORDER_OBJECTS.

this is my code :

I keep getting the message :

Element ORDER_OBJECTS[OPERATIONS] unknown

please can anyone help me solve this

thanks

enter image description here

Suncatcher
  • 10,355
  • 10
  • 52
  • 90
Charaf
  • 23
  • 4

1 Answers1

2

On a IRfcFunction object, SetValue can only handle scalar/elementary parameters like NUMBER.

The parameter ORDER_OBJECTS is structured, so you should first query the IRfcStructure object from the IRfcFunction object, then apply SetValue on that IRfcStructure object :

IRfcStructure struct = readData.GetStructure("ORDER_OBJECTS");
struct.SetValue("OPERATIONS", "X");
Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48