09-22-2006 7:00 PM
Hi,
Can we use Internal Table for export paramters for a RFC Function Module?I mean i have to send mearly 500 fields of data from SAP System to Sub System thru RFC call from the SubSystem.Is it possible r not.If not can u guys tell me anyother alternatives.
Thanks & regards,
Gopi.
09-22-2006 7:07 PM
Hi,
yes..you can..for that you have to create a table type in the DDIC..and use it the EXPORTING parameter..
THanks,
Naren
09-22-2006 7:09 PM
If you need to send a table to extenal system then you have to pass it in TABLES. Not in EXPORT parameters.
In EXPORT you can define only structures and fields.
09-22-2006 11:04 PM
Hi ,
Some r telling that we can send the tables by specifying in Export tables and some telling not and to we can use structure r fields.can anybody suggest the alternative for thi problem thru FM .
Thanks & Regards,
Gopi.
09-22-2006 11:10 PM
Hi,
I created a RFC with an exporting parameter which is an internal table..
The only thing is you should have a table type in the DDIC (Ex. CHAR80_T is a table type) for doing that...
Thanks,
Naren
09-22-2006 11:15 PM
Hi Naren,
Can u explain me What is DDIC and can u show me how to do thru an example.
Thanks & Reagrds,
Gopi.
09-22-2006 11:33 PM
Hi,
as I'm not sitting at the system, just what I remember:
Call transaction SE11.
select radio button Type. If you want a specific structure for your table, enter the name and push Create button. You are adked if your type should be Data element, structure or table type. Use structure and define your structure with fields and types. Activate. Leave transaction and start the same again, this time enter a new name an create a table type. In the table type definition, enter your structure as line type. Activate.
Use this table type as the type of your export or import parameter for (RFC) function module.
Note: To avoid any conflicts for now and the future, use only pure character fields in the table. All numeric or otherwise structured fields will have problems with operating systems, unicode compatibility and so on.
Regards,
Clemens
09-22-2006 11:44 PM
Hi,
DDIC is where all the tables, structures, data elements, domains, views, table types and others will be maintained..
The transaction code is SE11.
Example of a table type..
Goto SE11 -> select the radio button "Data type", then enter the value 'EXPO_MARA_T'. This is a table type of the structure MARA.
If you use it your program it will be declared as an internal table..
EX:
DATA: T_MARA TYPE EXPO_MARA_T WITH HEADER LINE.
The above statement becomes an internal table..
In the same way..
In the exporting parameter if you give
T_MARA TYPE EXPO_MARA_T
The parameter T_MARA becomes an internal table..You can do LOOP AT T_MARA inside your function module code..
Like EXPO_MARA_T you can create your table types in SE11 and use it in your exporting parameter..
Hope this helps..
THanks,
Naren
09-22-2006 11:56 PM
Hi Naren,
I understand what u told that u mean to create a table type for a Internal Table .My Internal table consists of 500 fields (i.e sales oreder data)soi have to go to se11 and there i have to defines astructure for 500 fileds and specify in export parameter.at that time shall i need to specify the internal table in Tables also as i specified structure of the inetrnal table in export paramrtr.
is there anyother alternative of creating structure for existing Internal table in a simple way by using Type and like which we use for defining internal tables.
Thanks & Regards,
Gopi.
09-23-2006 12:13 AM
Gopi,
still you can use a structure of type RAW and a length of 16k bytes per row. Switch off unicode tests for the program source and move internal table to raw structure.
The external system will have the trouble of assogning the fields anyway. And 500 fields I guess many of them will be measures and amounts: I think if you do not convert all of them to character format external system will have trouble.
Regards,
Cöemens
09-23-2006 5:26 AM
Hi Gopi,
TABLES is used to send N number of records viz. your internal table with 500 records.
EXPORT parameter is used to send only a single value say
if i want to send MATNR and MAKTX, then i need to define two parameters in export tab.
MATNR
MAKTX
This will return only one value each, for every call to the RFC.
<b>Creating Structure</b>
Goto SE11. Select DATA TYPE and enter a name SAY ZITRFC.
Click CREATE. Here in the FIELDS tab enter the Field name same as you have defined in internal table.
Activate it.
Now, in the RFC under TABLES tab write
ITRFC and in the type write ZITRFC.
In your RFC source code, declare ITRFC as
DATA : ITRFC type standard table of ZITRFC.
FUNCTION 'ZFUNCTION'.
Loop at itab.
itrfc-matnr = itab-matnr.
itrfc-maktx = itab-maktx.
append itrfc.
endloop.
ENDFUNCTION.
Thats it, now when you call the FM ZFUNCTION, it will send the 500 records in ITRFC.
Best regards,
Prashant