2014 Jan 29 6:43 AM
Hi,
Is there any way that I can pass an empty or initial internal table to an FM?
In my requirement the FM DDIF_TABL_PUT will be called, at times with internal tables with filled data and sometimes with empty ones, for some of the TABLES parameters . For eg, it is not necessary that DD05M_TAB has value during all the calls to the FM.
When I tried to pass empty IT, I am getting "Interal Error Occured" message.
Do you guys know any solution?
Regards,
Aparna
2014 Jan 30 12:30 PM
Hey, I got it working with another FM DD_TABL_PUT.
This FM accepts blank internal tables.
Thank you guys for all the help.
Hi,
Is there any way that I can pass an empty or initial internal table to an FM?
In my requirement the FM DDIF_TABL_PUT will be called, at times with internal tables with filled data and sometimes with empty ones, for some of the TABLES parameters . For eg, it is not necessary that DD05M_TAB has value during all the calls to the FM.
When I tried to pass empty IT, I am getting "Interal Error Occured" message.
Do you guys know any solution?
Regards,
Aparna
2014 Jan 29 6:49 AM
Hi Aparna,
Please debug and check.
Please refer to :
http://scn.sap.com/thread/3168398
which might be useful for you on how to pass the Parameters.
-Sowmya
2014 Jan 29 6:50 AM
Hi Aparna
In this case you should not pass the empty table also. Please read the documentation it clearly states when you dont have anything to passed do not pass it.
Caution:
A TABLES parameter is considered to be defined if a table without lines is passed to it. In this case the effect is totally different from that when this parameter is not mentioned in the call."
Nabheet
2014 Jan 29 7:17 AM
Hi Aparna,
You can use if statement to check table should not be initial. If its initial then comment DD05M_TAB parameter.
If DD05M_TAB is initial.
CALL FUNCTION 'DDIF_TABL_PUT'
EXPORTING
NAME = 'ZMARA1'
DD02V_WA = TABLE_HEADER
DD09L_WA = TECHN_SET
TABLES
DD03P_TAB = LT_FIELDS " Table fields
* DD05M_TAB = LT_05M_TAB "Comment DD05M_TAB
Else.
CALL FUNCTION 'DDIF_TABL_PUT'
EXPORTING
NAME = 'ZMARA1'
DD02V_WA = TABLE_HEADER
DD09L_WA = TECHN_SET
TABLES
DD03P_TAB = LT_FIELDS " Table fields
DD05M_TAB = LT_05M_TAB " Remove comment
endif.
2014 Jan 30 12:15 PM
Hi Shailesh,
But there is a combination of four tables to be passed.
That would make your solution too tedious. Is there any other way out?
Regards,
Aparna.
2014 Jan 30 12:30 PM
Hey, I got it working with another FM DD_TABL_PUT.
This FM accepts blank internal tables.
Thank you guys for all the help.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |