‎2007 Feb 23 3:47 PM
Hi all,
I am creating a FM which RFC enabled..so when i execute this FM it should only give PO numbers(ebeln) from the ekko table..but while declaring in the table i hve declared lt_ekko as ekko table...now when i execute the FM it is giving ebeln values and other fields are displayed with null values..how to remove those fields other than ebeln..i have decalred as below::
Tables:
LT_EKKO LIKE EKKO
In the source code i have written as ::
select ebeln from ekko into corresponding fields of table lt_ekko
where bsart in ('ECDP','ECPO','EB').
how to get only PO number ???
‎2007 Feb 23 4:17 PM
Hi,
That is the only way to create structure unless you only want to get a single PO
then you can use parameter instead table.
Regards,
Ferry Lianto
‎2007 Feb 23 3:52 PM
Hi,
Please create structure/tranparent table (SE11) with only field EBELN.
LT_EKKO TYPE ZEKKO.
Regards,
Ferry Lianto
‎2007 Feb 23 3:52 PM
Create a structure with single field as EBELN, and use the same in FM Table.
Thanks
‎2007 Feb 23 3:56 PM
if you just want to retrieve po values, you've to declare the table like:
lt_ekko type z_t_ekko. (tabletype z_t_ekko has just one column ebeln)
select ebeln from ekko into table lt_ekko
where bsart in ('ECDP','ECPO','EB').
Message was edited by:
Mario Schmidt
‎2007 Feb 23 4:00 PM
Hi,
1. In the Function Group i.e Global Data, declare a table as follows.
TYPES : BEGIN OF x_ebeln,
ebeln TYPE ebeln,
END OF x_ebeln.
DATA : lt_ekko TYPE TABLE OF x_ebeln.
2. In you code, <b>instead of</b>
select ebeln from ekko into corresponding fields of table lt_ekko
where bsart in ('ECDP','ECPO','EB').
<b>use</b>
select ebeln from ekko into table lt_ekko
where bsart in ('ECDP','ECPO','EB').
Now, your table has only one field therefore it will not display other field with null values.
Reward points if the answer is helpful.
Regards,
Mukul
‎2007 Feb 23 4:12 PM
THanks !
Is there any other way without creating the structure????
‎2007 Feb 23 4:17 PM
Hi,
That is the only way to create structure unless you only want to get a single PO
then you can use parameter instead table.
Regards,
Ferry Lianto