cancel
Showing results for 
Search instead for 
Did you mean: 

Street not displayed on SAPscript form.

Former Member
0 Kudos

Hi all,

Does anyone know why the STREET is not displayed on form?

GV_STREET is defined as global variable, I have debugged into SAPscript, the value for GV_STREET is there, but somehow it just cannot display on the form.

/: ADDRESS PARAGRAPH AS

/: TITLE &ADRS-ANRED&

/: NAME &ADRS-NAME1&, &ADRS-NAME2&, &ADRS-NAME3&, &ADRS-NAME4&

/: STREET &GV_STREET&

/: POBOX &ADRS-PFACH& CODE &ADRS-PSTL2& CITY &ADRS-PFORT&

/: POSTCODE &ADRS-PSTLZ&

/: REGION &ADRS-REGIO&

/: CITY &ADRS-ORT01&, &ADRS-ORT02&

/: COUNTRY &GV_LAND1&

/: FROMCOUNTRY &GV_SPRAS&

/:ENDADDRESS

Please advice and thanks in advance.

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member585060
Active Contributor
0 Kudos

Hi,

The STREET will not get print as you have not specified DELIVERY part in ADDRESS command.

The complete ADDRESS command is

/: ADDRESS [DELIVERY] [TYPE t] [PARAGRAPH a] [PRIORITY p] [LINES l]

If you add DELIVERY in that it will print the STREET value also.

DELIVERY

Means that the address should be formatted as a complete delivery address, using the street name and number rather than the P.O. Box.

Ex

/: ADDRESS 
/: TITLE 'Firma' 
/: NAME 'Schneider & Co', 'Finanzberatung' 
/: STREET 'Kapitalgasse 33' 
/: POBOX '12345' CODE '68499' 
/: POSTCODE '68309' 
/: CITY 'Mannheim' 
/: COUNTRY 'DE' 
/: FROMCOUNTRY 'DE' 
/: ENDADDRESS

This produces the following output address:

Firma

Schneider & Co

Finanzberatung

Postfach 12345

68499 Mannheim

/: ADDRESS DELIVERY 
/: TITLE 'Firma' 
/: NAME 'Schneider & Co', 'Finanzberatung' 
/: STREET 'Kapitalgasse 33' 
/: POBOX '12345' CODE '68499' 
/: POSTCODE '68309' 
/: CITY 'Mannheim' 
/: COUNTRY 'DE' 
/: FROMCOUNTRY 'DE' 
/: ENDADDRESS

This produces the following output address:

Firma

Schneider & Co

Finanzberatung

Kapitalgasse 33

68309 Mannheim

Regards

Bala Krishna

Former Member
0 Kudos

Hi Bala,

I have added DELIVERY after ADDRESS

/: ADDRESS DELIVERY PARAGRAPH AS
/: TITLE &ADRS-ANRED&
/: NAME &ADRS-NAME1&, &ADRS-NAME2&, &ADRS-NAME3&, &ADRS-NAME4&
/: STREET &GV_STREET&,  &GV_STREET2&
/: POBOX &ADRS-PFACH& CODE &ADRS-PSTL2& CITY &ADRS-PFORT&
/: POSTCODE &ADRS-PSTLZ&
/: REGION &ADRS-REGIO&
/: CITY &ADRS-ORT01&, &ADRS-ORT02&
/: COUNTRY &GV_LAND1&
/: FROMCOUNTRY &GV_SPRAS&
/:ENDADDRESS

But the STREET is still not able to display. I tried to check the syntax and it gives me "HOUSE or command end expected".

Do you know what does it mean?

former_member585060
Active Contributor
0 Kudos

Hi,

try to give HOUSE after street

/: HOUSE

or add in same line as STREET

/: STREET &GV_STREET&,  &GV_STREET2& HOUSE

Regards

Bala Krishna

Edited by: Bala Krishna on Jul 23, 2009 1:22 PM

Former Member
0 Kudos

Hi Bala,

Really appreciate your help.

If I try


 /:   HOUSE       &GV_STREET2&                    

I got this error: Command between ADDRESS-ENDADDRESS not allowed


/:   STREET      &GV_STREET&, &GV_STREET2& HOUSE           

I got this error: HOUSE or command end expected

Both are not working

I may need to have street3 and street4 information.

Please help and advice again. Thanks.

former_member585060
Active Contributor
0 Kudos

Hi,

Just give only 1 value for STREET and check output

/: STREET &GV_STREET&

Regards

Bala Krishna

Former Member
0 Kudos

Hi Bala,

Yes thanks, /: STREET &GV_STREET& is working now, but &GV_STREET2& is not printed.

I have tried


/: STREET &GV_STREET&
/: STREET2 &GV_STREET2&

But this is not working. I got error "Command between ADDRESS-ENDADDRESS not allowed " after the line

/: STREET2 &GV_STREET2&

former_member585060
Active Contributor
0 Kudos

Hi,

what u do is give gv_street2 in house

/:  STREET &GV_STREET&  HOUSE  &GV_STREET2&

Regards

Bala Krishna

Former Member
0 Kudos

Hi Bala,

Thanks for your patient.

Now the sapscript is without syntax error, but GV_STREET2 is not displayed.

By the way, is there any documentation that I can refer to for the usage of HOUSE?

I need to work out on other fields as well.

former_member585060
Active Contributor
Former Member
0 Kudos

Hi Bala,

Thanks for the great link.

Now I managed to get street displayed, in order to display street2, street3 and street4, what should I do now?

I have tried


/:STREET      &GV_STREET& HOUSE &GV_STREET2&

But I only can see GV_STREET is displayed.

former_member585060
Active Contributor
0 Kudos

Hi,

What you do is Concatenate all the Street address into a single field with a Subroutine program, so a single variable will hold your all the Street1, street2,....(gv_street, gc_street2.... into a single field) and it can be printed easily.

As there is no variant for street1, street2 as in the case of name1, name2.

So by concatenating you can easily get that.

Regards

Bala Krishna

Edited by: Bala Krishna on Jul 23, 2009 4:40 PM

Former Member
0 Kudos

Some hit and try:

1. Reduce some Street value to a very small value( say just one or two charachters) and then run the script.

2. Copy this to another script. Remove the windows above and left to the window that has this address and now run the new one.

Former Member
0 Kudos

Hi Jaya,

It is still not working.

But in SAPscript debug mode, I can see the value for GV_STREET and GV_STREET2.

Do you know why?

alex_m
Active Contributor
0 Kudos

I just want to give one more tips, can you place the street variable outside of the Address format and see whether the street value prints.

Former Member
0 Kudos

Hi Alex,

Thanks for the tips.

If I put the variable GV_STREET and GV_STREET2 outside from Address Paragraph, then it is displayed.

Can you explain to me what is wrong? How should this be included into Address paragraph?

alex_m
Active Contributor
0 Kudos

Just a try, increase your window size and see.

Former Member
0 Kudos

Hi Alex,

I have tried to increase the window size, however it is not working.

venkat_o
Active Contributor
0 Kudos

Hi wong,

how about COUNTRY and FROMCOUNTRY ?

Thanks

venkat.O

Former Member
0 Kudos

Hi Venkat,

Thanks for your reply. You have a very good thoughts. Yes, the COUNTRY and FROMCOUNTRY are working perfectly.

In fact I am using the same way doing for Street as well, but I just dont understand why it is not working.