05-14-2009 12:11 PM
Hi all,
I'm trying to print address from table KNA1in address window through a text element.
The corresponding code being :
In Delivery Prg,
Data : lv_kna1 type STANDARD TABLE OF kna1,
lv_adr6 type STANDARD TABLE OF adr6.
DATA : WA_ADR6 TYPE ADR6.
SELECT SINGLE * FROM KNA1 WHERE KUNNR = VBPA-KUNNR.
SELECT SINGLE * FROM ADR6 INTO WA_ADR6 where ADDRNUMBER = kna1-adrnr.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'DELIVERY_ADDRESS'
WINDOW = 'DELIVADR'
and calling the same text element 'DELIVERY_ADDRESS' as follows in the Script:
/E DELIVERY_ADDRESS
/: IF &LV_KNA1-TELF1& <> &SPACE&
IL Tel.: &LV_KNA1-TELF1&
/: ENDIF
/: IF &LV_KNA1-TELFX& <> &SPACE&
IL Fax : &LV_KNA1-TELFX&
/: ENDIF
/: IF &LV_ADR6-SMTP_ADDR& <> &SPACE&
IL E-mail : &LV_ADR6-SMTP_ADDR&
/: ENDIF
But,this text element is not printing in the output.
Any pointer on this would be of great help.
Regards,
Vamsee Priya.
05-14-2009 12:14 PM
Hi,
Please do the syntax check of your SAPSCRIPT.
You have mentioned the code as follows:-
/E DELIVERY_ADDRESS
/: IF &LV_KNA1-TELF1& &SPACE&
IL Tel.: &LV_KNA1-TELF1&
/: ENDIF
/: IF &LV_KNA1-TELFX& &SPACE&
IL Fax : &LV_KNA1-TELFX&
/: ENDIF
/: IF &LV_ADR6-SMTP_ADDR& &SPACE&
IL E-mail : &LV_ADR6-SMTP_ADDR&
/: ENDIF
I think you are missing the comparison operator in you IF statements.
Regards,
Ankur Parab
05-14-2009 12:15 PM
Hi,
Check out the statement.
SELECT SINGLE * FROM KNA1 WHERE KUNNR = VBPA-KUNNR.
select INTO which table??
mention the internal table in select statement.
and KUNNR = VBAP-KUNNR nor VBPA.
Regards
Rajesh Kumar
Edited by: Rajesh Kumar on May 14, 2009 1:16 PM
05-14-2009 12:22 PM
Hello ,
Check the code in SAP Script .
Once u r getting the Address number , Use the below syntax in Script wth Address ..Endaddress command. It will print whatwever the address maintained in ADR6 or ADRC tables .
ADDRESS DELIVERY PARAGRAPH <Paragraph Format>
ADDRESSNUMBER &<AddressNumber varaible>&
FROMCOUNTRY &<From Country&
ENDADDRESS.
Regards
05-14-2009 1:05 PM
Hi,
Placed the following code in Script...
/: ADDRESS DELIVERY PARAGRAPH
IL E-mail : &ADR6-SMTP_ADDR&
/: ENDADDRESS.
but still it is not working.
I need E-mail address to get printed.
Regards,
Vamsee.
05-14-2009 1:12 PM
05-14-2009 1:19 PM
yes, it is.
I'm trying to get the e-mail address from adr6 table with the corresponding address number from table kna1.
so I created two tables as below:
Data : lv_kna1 type STANDARD TABLE OF kna1,
lv_adr6 type STANDARD TABLE OF adr6.
DATA : WA_ADR6 TYPE ADR6.
SELECT SINGLE * FROM KNA1 WHERE KUNNR = VBPA-KUNNR.
SELECT SINGLE * FROM ADR6 INTO WA_ADR6 where ADDRNUMBER = kna1-adrnr.
now, I'm trying to fill e-mail adress from lv_adr6. but the problem is lv_adr6 is not getting filled.
data is coming to work area wa_adr6.
SAP is not allowing me to write the below statement:
SELECT SINGLE * FROM ADR6 INTO LV_ADR6 where ADDRNUMBER = kna1-adrnr.
Now, will any move-corresponding statement from work area to its table works?? Is that logically correct??
05-14-2009 1:24 PM
Hi,
change the statement from
SELECT SINGLE * FROM ADR6 INTO LV_ADR6 where ADDRNUMBER = kna1-adrnr.
to
modified code
SELECT SINGLE * FROM ADR6 INTO TABLE LV_ADR6 where ADDRNUMBER = kna1-adrnr.
Regards,
Siddarth
05-14-2009 1:26 PM
hELLO ,
tRY BELOW CODE :
Data : lv_kna1 type kna1,
lv_adr6 type adr6.
DATA : WA_ADR6 TYPE ADR6.
SELECT SINGLE * FROM KNA1 INTO lv_kna1 WHERE KUNNR = VBPA-KUNNR.
SELECT SINGLE * FROM ADR6 INTO lv_adr6 where ADDRNUMBER = kna1-adrnr.
REGARDS
05-14-2009 1:33 PM
Thank u so much for the replies.
Now, Im getting the code into lv_adr6, but still its is not getting printed.
I'm writing a text -element delivery_address and trying to give this to write_form as below:
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'DELIVERY_ADDRESS'
WINDOW = 'DELIVADR'
Is this correct method of printing a variable?
1) wrote a select query from the tables
2) gave a text element in sap script under the required code
3) trying to call this text-element as shown above.
anything else need to be added to my code??
05-14-2009 1:39 PM
hi...
write the code in this way and check if it works...
just copy and paste it...
Data : lv_kna1 type kna1,
lv_adr6 type adr6.
SELECT SINGLE * FROM KNA1 INTO LV_KNA1 WHERE KUNNR = VBPA-KUNNR.
SELECT SINGLE * FROM ADR6 INTO LV_ADR6 where ADDRNUMBER = kna1-adrnr.
Regards,
Siddarth
05-15-2009 5:58 AM
Hi all,
Thank u for your replies.
The issue is solved.
Address window is overlapping with main window, because of which the data is not printing.
05-15-2009 6:01 AM
Hello ,
If the issue is solved , please close the thread .
Regards,
05-15-2009 6:04 AM
Hi Vamseepriya,
According to the forum rules,
you have to close the thread once the issue is resolved, and also you have to award points based on their helpful answers.
Please take a few minutes to read the forum rules.
Regards,
Siddarth
Edited by: Siddharth Chordia on May 15, 2009 7:04 AM