Hi guys
Can you please suggest me whether below statements has any logical or performance problem?
1) Get address information of PO items and save it to internal table "address information".
Is the below logic is correct to fetch the address information?
Join with T001W buffered table is not good way to write code? pls confirm.
SELECT T001W~NAME1 T001W~STRAS ADRC~STR_SUPPL2 ADRC~TEL_NUMBER ADRC~FAX_NUMBER FROM T001W JOIN ADRC ON T001W~ADRNR = ADRC~ADDRNUMBER FOR ALL ENTRIES IN Internal table "PO information" INTO Internal table "address information" WHERE T001W~WERKS = "PO information"-WERKS
2)Using Sort command before Read table binary search.
Gives error that "SORT does not exist before ( READ TABLE U_TG_ADDRESS ) or was not found."
is this incorrect logic error? should i have to use SORT command just before line of Read ....Binary search statement.?
or can i use anywhere before and go with below statement. pls confirm
i sorted below internal tables in Previous Subroutine Perform. SORT C_TG_ADDRESS BY WERKS ASCENDING. SORT C_TG_DRAW_NO BY MATNR ASCENDING. SORT C_TG_PO_MASTER BY EBELN ASCENDING In next subroutine Perform i used like this LOOP AT U_TG_PO_MASTER INTO WL_PO_MASTER. * Read PO address information READ TABLE U_TG_ADDRESS INTO WL_ADDRESS WITH KEY WERKS = WL_PO_MASTER-WERKS BINARY SEARCH. * Read Drawing No. READ TABLE U_TG_DRAW_NO INTO WL_DRAW_NO WITH KEY MATNR = WL_PO_MASTER-MATNR BINARY SEARCH.
Regards
Kumar
Edited by: princeck on Aug 8, 2011 1:39 PM
Edited by: princeck on Aug 8, 2011 1:48 PM