cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in Script.

radhushankar
Participant
0 Kudos

Hi All,

I need some clarification in script,

I need to populate some extra details in the vendor address window .

ADDRESS PARAGRAPH AV

TITLE &LFA1-ANRED&

NAME &LFA1-NAME1&

ENDADDRESS

With this window i need to add a another field called street. i have retrieved it through perform and end perform and i am having the street name in this field called LV_STREET.

I just inserted the field like this.

ADDRESS PARAGRAPH AV

TITLE &LFA1-ANRED&

NAME &LFA1-NAME1&

&LV_STREET&

ENDADDRESS

Its is not getting populated can any one suggest me this title,name fields are related to that or where and all i can check to get it populated.

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos
/: ADDRESS 
/: TITLE &LFA1-ANRED&
/: NAME &LFA1-NAME1&
/: STREET &lv_street& 
/: ENDADDRESS

use like this

radhushankar
Participant
0 Kudos

hI karthik,

Thanks for your quick reply..it would great if you can tell me whether title,name,street are associated with the fields what we are populating.

And more to that already one street is defined over there and i need to populate the street2..

If i give street2 &lv_street& its not working..

Thanks,

Arun.

radhushankar
Participant
0 Kudos


/: ADDRESS 
/: TITLE &LFA1-ANRED&
/: NAME &LFA1-NAME1&
/: STREET &LFA1_STRAS& (Street)
/: ENDADDRESS

Already its like this if i want to add another street2 which is lv_street in my case how can i addd it??

Thanks,

Arun

Former Member
0 Kudos

try giving it as

/: street 2 &lv_street&

if it doesnot work let me know.

кu03B1ятu03B9к

radhushankar
Participant
0 Kudos

  • STREET 2 &LV_STREET&*
I have given like this ADDRESS PARAGRAPH AV PERFORM GET_STREET2 IN PROGRAM ZM_SCHED_ROUTINE DEFINE &LV_STREET(35)& USING &EKKO-LIFNR& CHANGING &LV_STREET& ENDPERFORM TITLE &LFA1-ANRED& NAME &LFA1-NAME1& STREET &LFA1-STRAS& POBOX &LFA1-PFACH& CODE &LFA1-PSTL2& CITY &LFA1-ORT01& POSTCODE &LFA1-PSTLZ& COUNTRY &LFA1-LAND1& REGION &LFA1-REGIO& FROMCOUNTRY &T001-LAND1& ENDADDRESS

Kathik - its not working..any more suggestions please??

radhushankar
Participant
0 Kudos

I have given like this.



ADDRESS PARAGRAPH AV
PERFORM GET_STREET2 IN PROGRAM ZM_SCHED_ROUTINE
DEFINE &LV_STREET(35)&
USING &EKKO-LIFNR&
CHANGING &LV_STREET&
ENDPERFORM
  TITLE    &LFA1-ANRED&
  NAME     &LFA1-NAME1&
  STREET   &LFA1-STRAS&
  STREET 2 &LV_STREET&
  POBOX    &LFA1-PFACH&  CODE &LFA1-PSTL2&
  CITY     &LFA1-ORT01&
  POSTCODE &LFA1-PSTLZ&
  COUNTRY  &LFA1-LAND1&
  REGION   &LFA1-REGIO&
  FROMCOUNTRY &T001-LAND1&
ENDADDRESS

lv_street has values but i couldn't c it in the output any more suggestions please?

Thanks

former_member585060
Active Contributor
0 Kudos

Hi,

Try this

/: ADDRESS 
/: TITLE &LFA1-ANRED&
/: NAME &LFA1-NAME1&
/: STREET &LFA1_STRAS& , &LV_STREET&       " use , in between 2 streets
/: ENDADDRESS

ADDRESS PARAGRAPH AV
PERFORM GET_STREET2 IN PROGRAM ZM_SCHED_ROUTINE
DEFINE &LV_STREET(35)&
USING &EKKO-LIFNR&
CHANGING &LV_STREET&
ENDPERFORM
  TITLE    &LFA1-ANRED&
  NAME     &LFA1-NAME1&
  STREET   &LFA1-STRAS&, &LV_STREET&    " Use only 1 Street but use , if you have street 2 value
  POBOX    &LFA1-PFACH&  CODE &LFA1-PSTL2&
  CITY     &LFA1-ORT01&
  POSTCODE &LFA1-PSTLZ&
  COUNTRY  &LFA1-LAND1&
  REGION   &LFA1-REGIO&
  FROMCOUNTRY &T001-LAND1&
ENDADDRESS

Regards

Bala Krishna

Edited by: Bala Krishna on Mar 12, 2009 11:43 PM

Former Member
0 Kudos

sapscript formats an address endaddress by making an implicit call to FM address_into_printform

make a call to this fm by passing the parameter STREET_HAS_PRIORITY of the function module ADDRESS_INTO_PRINTFORM .

now check if u get street 2 &lv_street&

this sap help will help you

http://help.sap.com/saphelp_nw04/helpdata/en/18/c042d8da4811d3b571006094192fe3/frameset.htm

кu03B1ятu03B9к

radhushankar
Participant
0 Kudos

Hi Bala,

Due to limitation in the space i need to put the street in the second line..

Any more suggestion plz..

Thx

former_member585060
Active Contributor
0 Kudos

Hi,

It will come in second line only, just try the code and see what it displays.

Regards

Bala Krishna

Edited by: Bala Krishna on Mar 12, 2009 11:54 PM

radhushankar
Participant
0 Kudos

Hi Bala,

I have made it like this..


  STREET   &LFA1-STRAS&,  &LV_STREET&

Now the result is, both the details in the output has disappeared.

Tnx.

radhushankar
Participant
0 Kudos

Any more suggestion plz..

Tnx

former_member585060
Active Contributor
0 Kudos

Hi,

Try this way

ADDRESS DELIVERY PARAGRAPH AV                                 " add DELIVERY
PERFORM GET_STREET2 IN PROGRAM ZM_SCHED_ROUTINE
DEFINE &LV_STREET(35)&
USING &EKKO-LIFNR&
CHANGING &LV_STREET&
ENDPERFORM
  TITLE    &LFA1-ANRED&
  NAME     &LFA1-NAME1&, &LFA1-STRAS&                            " Give street1 value in Name line
  STREET   &LV_STREET&                                                      "  street 2 value in STREET
  POBOX    &LFA1-PFACH&  CODE &LFA1-PSTL2&
  CITY     &LFA1-ORT01&
  POSTCODE &LFA1-PSTLZ&
  COUNTRY  &LFA1-LAND1&
  REGION   &LFA1-REGIO&
  FROMCOUNTRY &T001-LAND1&
ENDADDRESS

As default address consists of the following

/: ADDRESS [DELIVERY] [TYPE t] [PARAGRAPH a] [PRIORITY p] [LINES l] 
/: TITLE title 
/: NAME name1[,name2[,name3[,name4]]]           " Name can be name 1 name 2 etc
/: PERSON name of natural person [TITLE form of address]
/: PERSONNUMBER number of the personen
/: DEPARTMENT department
/: STREET street name HOUSE house number    " Street can have only 1 value it can have House no
/: LOCATION additional location information
/: POBOX po box [CODE post code / zip code] [CITY city]
/: POSTCODE post code / zip_code 
/: CITY city1[,city2] 
/: NO_UPPERCASE_FOR_CITY
/: REGION county / state 
/: COUNTRY recipient country [LANGUAGE language code]
/: COUNTRY_IN_REC_LANG 
/: LANG_FOR_COUNTRY language key
/: FROMCOUNTRY sender country 
/: ADDRESSNUMBER address number
/: ENDADDRESS

See wether above code works or not.

Regards

BAla Krishna

radhushankar
Participant
0 Kudos

Thanks Bala and Karthik.

Answers (0)