Skip to Content
0
Former Member
Jan 10, 2008 at 06:48 AM

2 select in same program

51 Views

hi

1) condition to retrieve lifnr land1 name1 ort01 from TABLE LFA

COndtion1 : lifnr = i_tmp-lifnr (lifnr = Account Number of Vendor or Creditor)

SELECT lifnr land1 name1 ort01

FROM lfa1

INTO TABLE i_lfa1

FOR ALL ENTRIES IN i_tmp

WHERE lifnr = i_tmp-lifnr.

IF sy-subrc EQ 0.

SORT i_lfa1 BY lifnr.

ENDIF.

2 )condition to retrieve LIFNR name1

COndition2 :

-


First retrieve shipment to which delivery is assign (SELECT tknum from VTTP where i_tmp-lfsnr=VTTP-VBELN)

-


second retrieve agent to which shipment No is assign (SELECT TDLNR from VTTK where tknum = VTTP-tknum)

-


third retrieve name to which agent No is assign (Select name1 from LFA1 where tdlnr = VTTK-tdlnr)

I have two condition as indicated above and i already done the select as per condition (1) with delivery number

not i have the condition (2) with agent number requirement to meet normally we don't do select in table LFA1 twice in same program because of performance?

it seem i don't have a choice here can anyone adivse of other possibility