on 2006 Jul 31 10:25 PM
Hi Krishna,
Please try FM <b>K_ABC_GET_WERKS_FOR_BUKRS</b> to get plants based on company code.
Hope this will help.
Regards,
Ferry Lianto
Please reward points if helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is another RFC FM.
report zrich_0001.
data: it001w type table of t001w with header line.
call function '/SAPNEA/SMAPI_PLANT_GETLIST'
tables
plant_top = it001w.
loop at it001w.
write:/ it001w-werks, it001w-name1.
endloop.
Regards,
Rich Heilman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not finding any BAPI yet. But you can achieve the same using this code.
report zrich_0001.
data: iopt type table of rfc_db_opt with header line.
data: ifld type table of rfc_db_fld with header line.
data: idat type table of tab512 with header line.
ifld-fieldname = 'WERKS'. append ifld.
ifld-fieldname = 'NAME1'. append ifld.
call function 'RFC_READ_TABLE'
exporting
query_table = 'T001W'
delimiter = ','
* NO_DATA = ' '
* ROWSKIPS = 0
* ROWCOUNT = 0
tables
options = iopt
fields = ifld
data = idat
exceptions
table_not_available = 1
table_without_data = 2
option_not_valid = 3
field_not_valid = 4
not_authorized = 5
data_buffer_exceeded = 6
others = 7.
loop at idat.
write:/ idat.
endloop.
Regards,
Rich Heilman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
105 | |
8 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.