on 03-18-2013 6:51 AM
Masters i have to perform
SELECT SINGLE ivpro FROM aufk WHERE aufnr = "gwa_account-ORDER_NO using RFC_READ_TABLE but i dont know how to do it please tell me
Hi,
Normally I use the FM META_READ_TABLE to read tables of the backend system, try with this code:
DATA: lt_options TYPE TABLE OF rfc_db_opt,
ls_options LIKE LINE OF lt_options,
lt_fields TYPE TABLE OF rfc_db_fld,
ls_fields LIKE LINE OF lt_fields,
lt_data TYPE TABLE OF tab512,
ls_data LIKE LINE OF lt_data.
* Options:
CONCATENATE '''' gwa_account-order_no '''' INTO ls_options-text.
CONCATENATE 'AUFNR EQ' ls_options-text
INTO ls_options-text SEPARATED BY space.
APPEND ls_options TO lt_options.
* Fields to read:
ls_fields-fieldname = 'IVPRO'. APPEND ls_fields TO lt_fields.
* ;
CALL FUNCTION 'META_READ_TABLE'
EXPORTING
query_table = 'AUFK'
logical_system = lv_logsys "your logsys
TABLES
OPTIONS = lt_options
fields = lt_fields
data = lt_data.
READ TABLE lt_data INTO ls_data INDEX 1.
IF sy-subrc EQ 0.
lv_ivpro = ls_data.
ENDIF.
http://wiki.sdn.sap.com/wiki/display/SRM/META_READ_TABLE
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.