Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

read table Urgent !!!!!!!!!!!!!!!!

Former Member
0 Likes
710

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.

6 REPLIES 6
Read only

Former Member
0 Likes
680

Hi,

Yes you can use the fields in the read statement which are not primary key in SE11.

Thanks,

Sriram Ponna.

Read only

0 Likes
680

what about my second issue.

Read only

0 Likes
680

Hi,

Yes.

Read only

Former Member
0 Likes
680

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

Read only

0 Likes
680

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.

Read only

Former Member
0 Likes
680

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..