2009 Dec 30 1:23 PM
Hello Guru,
I'm having a Problem with RFC-Function-Module.
In my function module I read an optional table called myops_table like this way
Read table myops_table
IF myops_table IS NOT INITIAL
DO something
ENDIF.
The problem that I removed the instruction "Read table myops_table" and after calling the function module with an external program using RFC, the table is INITIAL and the program is not working correctly.
But, if I do this in SAP, the program works fine without having the read-instruction.
Has this to do that the optional table is not buffered and that man need to read it first.
Best Regards,
Kais
2009 Dec 30 1:30 PM
Hello,
You might have to try like this
IF myops_table[] IS NOT INITIAL.
* DO something
ENDIF.
IF myops_table IS NOT INITIAL. "it refers only the header and not the actual data.
Vikranth
Hello Guru,
I'm having a Problem with RFC-Function-Module.
In my function module I read an optional table called myops_table like this way
Read table myops_table
IF myops_table IS NOT INITIAL
DO something
ENDIF.
The problem that I removed the instruction "Read table myops_table" and after calling the function module with an external program using RFC, the table is INITIAL and the program is not working correctly.
But, if I do this in SAP, the program works fine without having the read-instruction.
Has this to do that the optional table is not buffered and that man need to read it first.
Best Regards,
Kais
2009 Dec 30 1:30 PM
Hello,
You might have to try like this
IF myops_table[] IS NOT INITIAL.
* DO something
ENDIF.
IF myops_table IS NOT INITIAL. "it refers only the header and not the actual data.
Vikranth
2009 Dec 30 1:41 PM
Thanks Vikranth.
Now, I'm aware about it.
But could you explain me why it works fine in SAP and not well by an RFC-Call.
Is this has to do of the fact that the table optional. So, the header is not set by an RFC-Call when this table is optional. By it's set on a direct call.
Should I do this by all the tables whether they are optional or not.
Best Regards,
Kais
2009 Dec 30 2:05 PM
Hello Kias,
Not really sure why its not working in a RFC call. Could be that the headers are getting intitialized automatically during a RFC and not when running within SAP. But i dont think this has anything to do with tables parameter being a optional or mandatory.
The correct method to check if a table is initial or not is only by specifying []. You will have to do this to all tables to avoid any inconsistencies.
Vikranth
2009 Dec 30 5:39 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |