‎2008 Feb 12 6:42 AM
IF sy-subrc = 0.
MOVE: wa_create_po-matnr TO wa_create_po_out-matnr,
wa_create_po-order TO wa_create_po_out-kdauf,
wa_create_po-line TO wa_create_po_out-kdpos.
READ TABLE i_bdcmsgcoll INTO wa_bdcmsgcoll WITH KEY msgtyp = c_s.
IF sy-subrc = 0.
MOVE: wa_bdcmsgcoll-msgv1 TO wa_create_po_out-plnum.
ENDIF.
APPEND wa_create_po_out TO i_create_po_out.
1. in the above code i have used read statement with key msg typ actually this is not a key field in se11.
2.can i use index for matching up the material
(wa_create_po-matnr) and planned order ( wa_bdcmsgcoll-msgv1 ) and append in a internal table.
‎2008 Feb 12 6:45 AM
Hi,
Yes you can use the fields in the read statement which are not primary key in SE11.
Thanks,
Sriram Ponna.
‎2008 Feb 12 6:47 AM
‎2008 Feb 12 6:49 AM
‎2008 Feb 12 6:50 AM
U can use fields who r not primary key, but u want to retrieve only those masg type which are of type success , if there are many msg then it can be problem
so put key constraint more .
Means With key, increase the no of keys
U can use index u r sure which index record u wan to retrieve for materil no
Rewards point if helpful
Edited by: neetu chhabra on Feb 12, 2008 7:51 AM
‎2008 Feb 12 6:54 AM
i am uploading the data from a flat file so if the call transcation statement gets success it moves on to subrc = 0, and then it updates the material and then after creation all those stuff then the planned order will be in bdcmsgcoll and i pick planned order from bdc msg coll and i need to append both the data, material no whichis been created and the planned order got generated and i will place it in to a internal table.
‎2008 Feb 12 6:57 AM
Hi Rocky ,
yes you can use non primery key in the read statment , if you are worrieng about the performance of the program then you can use multiple key fields (if you have) in Read statement .
Although to improve the performance use Binary Search also.
regards
Swati..