cancel
Showing results for 
Search instead for 
Did you mean: 

Change the address in the right hand side of purchase order form

Former Member
0 Kudos

Hi all,

I am new to forms and scripts. I have to modify the output of Purchase Order form/script such that the Ship to and Bill to address that they have now on top right corner must be modified with the address that I have.

How should i be doing this?

I found that they copied the program SAPFM06P into ZSAPFM06P and the form name is some thing called ZABC_PURCHASEORDER . Now I want to figure out how should i be changing the purchase order form so that the Ship to and Bill to address that they have now on top right corner must be modified with the address that I have.

the output type is named as ZNE7.

Some one please direct me how to figure out. i dont even know if it is a sap script or smart form.

also please help me in whihc places i should look to change the the Ship to and Bill to address that they have now on top right corner must be modified with the address that I have.

Regards,

Jessica Sam

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

goto nace-application EFclick on PUTPUT TYPES

AND find ZNE7 click on this and goto processing routines.

here check the program name and check whther it is form or smartform .

u will get it. now goto that prticular smartform or script and debug it to get adrnr .

as per adrnr fetch data.

if u already get all details then ask for next help which u want?

Former Member
0 Kudos

check in tnapr table if the form name is under field formname it is script if its under sform its a smartform, anyways u can always try opening it in both se71 and smartforms transaction and whichever opens up, it is gng to be ur form.

кu03B1ятu03B9к

Former Member
0 Kudos

Thanks for replying karthik.

I founds that the entry in tapnr table is against the Formname field. so that means it is a sap script.

now in the output of the form, i find should change the ship to and bill to address that is mentioned in the right hand side top most corner of the purchase order o/p.

Can you please tell me where i should be looking to chane this address?

I am new to forms...it might be very simple but i am getting no clues about this...i tried searching in sdn too..but cant find where exactly should i be lloking to change the current bill to asnd ship to asddress on the right hand side top most corner to the address that i have now.

Any help by anybody will be highly appreciated.

Regards,

Jessica Sam

Former Member
0 Kudos

open the form in se71, now check the windows, u must be having a n address window, double click it and then click the editor button , if u cant determine which window has address just open layout and see the window's name

Former Member
0 Kudos

Ok karthik..i found that there is a windo called ship to where they have stored the following in Text Elements



HEADER_DELADDRESS
* <B> ABC Corporation </>
*
*DDRESS DELIVERY PARAGRAPH AS PRIORITY
*   TITLE                  &SADR-NAME2&
*   NAME                 &SADR-NAME1&,    &SADR-NAME2&
*   STREET              &SADR-STRAS&
*   CITY                   &SADR-ORT01&,     &SADR-PSTLZ&
*   POSTCODE        &SADR-PSTLZ&
*   REGION             &SADR-REGIO&
*   COUNTRTY        &SADR-LAND1&
*ENDADDRESS
*   FROMCOUNTRY &LFA1-LAND1&
*   POSTCODE        &SADR-PSTLZ&
*   CITY                   &SADR-ORT02&,    &SADR-ORT01&
*   POSTCODE                                     &SADR-PSTLZ&
*   COUNTRY          &SADR-LAND1&,   &SADR-PSTLZ&
*   REGION             &SADR-REGIO&
*   FROMCOUNTRY &LFA1-LAND1&
*   ENDADDRESS
BILL TO:
ABC Corporation Inc,
6000 Street1
SUITE # 700, City1
Country1   789045
+1 (999) 999-9999(Phone)
   (999) 999-9999(Fax)
* ABC Company     "AS
* 5678 Street2        "AS
* CITY1, State1, 99999 " AS
* 999 999 9999 " AS
SHIP TO:
HEADER_DELADDRESS
* <B> ABC Corporation </>
*
*ADDRESS DELIVERY PARAGRAPH AS PRIORITY
*   TITLE                  &SADR-ANRED&
*   NAME                 &SADR-NAME1&,    &SADR-NAME2&, &S
*   STREET              &SADR-STRAS&
*   POBOX               &SADR-PSTLZ&
*   COUNTRY          &SADR-LAND1&
*   REGION             &SADR-REGIO&
*   FROMCOUNTRY  &SADR-LAND1&
*   ENDADDRESS
HEADER_DELADDRESS_3RDPARTY
BILL TO:
ABC Corporation Inc,
6000 Street1
SUITE # 700, City1
Country1   789045
+1 (999) 999-9999(Phone)
   (999) 999-9999(Fax)
SHIP TO
*ADDRESS DELIVERY PARAGRAPH AS

ABC Corporation Inc,
6000 Street1
SUITE # 700, City1
Country1   789045
+1 (999) 999-9999(Phone)
   (999) 999-9999(Fax)
BILL TO:
ABC Corporation Inc,
6000 Street1
SUITE # 700, City1
Country1   789045
+1 (999) 999-9999(Phone)
   (999) 999-9999(Fax)

SHIP TO:

So to chjange the Bill to and Ship top address that appear in the right hand side top most corner of the purchase order, what should i be changing in the text elements of the PO?

please guide me..i am very new to sapscripts and i have to finish this task as soon as possible as this is a production support issue.

Will be waiting for some clues

Regards,

Jessica Sam

Former Member
0 Kudos

it seems the address has been hardcoded, it will be printing same, so what is ur requirment to print now?

Former Member
0 Kudos

Karthik in the PO output that we have currently the following appear in the right hand top most cornere of the PO print o/p as follows

BILL TO

ABC Corporation Inc

Street 1, City 1, State 1,

98905

+1-(999) 999 9999 (Phone)

(888) 888 8888 (Fax)

SHIP TO

ABC Corporation Inc

Steet 1, City1, State 1, 98950

+1-(999) 999 9999 (Phone)

(888) 888 8888 (Fax)

Now i should make changes such that the Purhcase Order has the following addres on the top most corner in the right hand side of the PO

BILL TO

DEF Corporation Inc

Street 2, City 2, State 2,

66666

+1-(999) 999 9999 (Phone)

(888) 888 8888 (Fax)

SHIP TO

DEF Corporation Inc

Steet 2, City2, State 2, 966666

+1-(999) 999 9999 (Phone)

(888) 888 8888 (Fax)

So should i be directly chanmging the addres there?

but i see that Bill to is hard coded ..but in ship to i find some thing like &SADR-ANRED etc etc some fields between &&.

So not sure what should i do to change the ship to and bill to address

Thanks for ur valuable suggestion on weekend too...i know how it pains to work on weekends

Will be waiting for ur reply

Regards,

Jessica Sam

Former Member
0 Kudos

Hi,

Dont hard code the Address . Use 'ADDR_GET' Function module to get the address for given address number. Sample code :

CALL FUNCTION 'ADDR_GET'

EXPORTING

address_selection = ADDRNO---:Provdie Ship to/Bill to Adress number

IMPORTING

sadr = sadr

EXCEPTIONS

parameter_error = 1

address_not_exist = 2

version_not_exist = 3

internal_error = 4

OTHERS = 5.

Write the like above code in your driver prgogram and palce SADR fields in required position on page.

former_member205763
Active Contributor
0 Kudos

Ur bill to address is hard coded, (not sure why it is done), but ship to address is being printed using address - endaddress which right way to print it, currently ur addresss is being calculated in ur driver program and passed to script, so u need to identify on what condition the address is picked and based on that u just have to modify that particular record in adrc table, i think it is maintained somewhere in customising which the functional guy can change , if u change that, it will automatically get reflected in script.

Former Member
0 Kudos

Karthik,

I checked in the Text Elements and as you mentioned the Bill to is hard coded but Ship to is passing from the program.

i did not figure out how it is being passed from program ..but the Bill to adress that is hardcoded in text elemnts..that i changed with new address and printed the o/p of an existing old PO..but still change is not reflecting.

I am doing in correct way?

Regards,

Jessica Sam

Former Member
0 Kudos

Hi jessica sam,

Use Perform and endform in Script and get the desired values what you want to be printed.

Its nothing to do with the driver program.

Regards,

Suneel G

Former Member
0 Kudos

Suneel,

I am not writng a new script for PO. We have an existing SAP script and a Zdriver program whihc passes the Bill to and Ship to address on the right hand top most corner of the Script

and now i should figure out where they have maintained these addreses as they are always same on each and every Purchase order.

Once i figure out where they have maintained the address..i should then go and chnage the Bill to and Ship to address to a new address that they gave ..and the chane should reflect and when ever we print a PO...we should get that address on the right hand top corner insteads of the old address.

and i am really breaking my head to find out where they have maintained the current ship to and bill to address..and how it is getting passed to the print output of the PO

Any help by any body will be highly appreciated.

Regards,

Jessica Sam

Former Member
0 Kudos

Karthik..when you say the Bill to address is hard coded..do u mean in the Text elements that i mentioned?

I tried changing the existing Bill to address in the Text elemnts of the window...but the change doesnt reflect..

any clues ..where i am missing?

Regards,

Jessica Sam

former_member205763
Active Contributor
0 Kudos

u must be doing changes in the script in DEV system and testing then in TEST system, but changes donot get reflected automatically in case of scripts,

if u open ur ur script in se71 in TEST system u'll not have the changes there, so u need to transport ur changes using SCC1,

suppose ur DEV is 100 and TEST is 110,

so goto SCC1 in 110 and then give source client as 100, give ur change request number and execute the tcode so now changes will be copied now test ur changes, they should be fine now.

кu03B1ятu03B9к

Former Member
0 Kudos

No karthik,

I did the changes direcly in Dev sys only and checking the o/p

Any thought abt ..weather i cheanged the addres in the right place?

Regards,

Jessica Sam

former_member205763
Active Contributor
0 Kudos

u are checking the output also in same client, where u did ur chnages or checking the output in a different client?

кu03B1ятu03B9к

Edited by: Kartik Tarla on Apr 8, 2009 1:38 AM

Former Member
0 Kudos

Karthik,

In our development system, we have only one clinet named 100 and I did the changes direclty in clinet 100 ..butstill the changes dont reflect...

Wondering..whatz wrong

i changed in the Text Elements of the Bill to Windo.

Can you tell me how should i be using debugger to see what values are being passed on to the sap script o/p when i give a print comand?

Regards,

Jessica Sam

former_member205763
Active Contributor
0 Kudos

execute the program RSTXDBUG, to activate the debugger, when u start ur print a dialog box will come just press ok it will enter ur script in Dbug

Former Member
0 Kudos

hi,

in sapscript,

check in which element bill to address is printing.

coz..there is a chance,two times they are printing bill to address but while printing only one element is called by driver program .

also debug the script. and check exactly in which element address is printing.