01-10-2008 6:48 AM
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
01-10-2008 7:06 AM
Hi,
already u r retrieveing NAME1 from first select query for that particular lifen,i think thats enough..no need for second select query..
Regards,
Nagaraj
01-10-2008 6:55 AM
hi,
retrive the TDLNR field from the first select statement in condition 1.
loop through this internal table and read the VTTK table compare the TDLNR fields and modify the internal table. in this case you no need to write two select statement.
Regards,
Venkata Narayana
01-10-2008 7:02 AM
01-10-2008 7:06 AM
Hi,
already u r retrieveing NAME1 from first select query for that particular lifen,i think thats enough..no need for second select query..
Regards,
Nagaraj
01-10-2008 7:08 AM
But it's not the same condition
1)as per vendor/creditor account
2)as per agent number
01-10-2008 7:15 AM
Hi,
yes u r ryt...... TDLNR is not thre in LFA1,so u cannot write ur second select query on LFA1,,what i think is TDLNR is nothing but LIFNR ONLY.
Regards,
Nagaraj
01-10-2008 7:13 AM
if there is no TDLNR field in LFA1 table how you are using the below condition..
-
third retrieve name to which agent No is assign (Select name1 from LFA1 where tdlnr = VTTK-tdlnr)
Regards,
Venkata Narayana
01-10-2008 7:15 AM
TDLNR is nothing but vendor number(LIFNR).
Regards,
Venkata Narayana
01-10-2008 8:10 AM
yes you are correct
-
third retrieve name to which agent No is assign (Select name1 from LFA1 where LIFNR = VTTK-tdlnr)
but i am not sure it's the same . the first condition is about LFA1-LIFNR = account nu of vendor or creditor
second condition is on LFA1-LIFNR = Agent number in TDLNR
01-10-2008 11:10 AM
it's same.....
you cna go ahead and use the LIFNR field... for TDLNR...
Regards,
Venkata Narayana