cancel
Showing results for 
Search instead for 
Did you mean: 

SAPscript printing address from FK03

Former Member
0 Kudos

Hi everyone

I haven't dealt with tables and structures yet so please bear with me

We have a SAPscript that prints checks to our venders which prints the address with only 3 lines.

When I look at the SAPscript the address is coming from the table REGUH.

Inside tcode FK03 there are 2 lines for street. The first field is labeled STREET 2 and the second is

STREET/HOUSE NUMBER. Street/House number is printing on the check just fine and I can see that it

is being pulled into the table REGUH as field ZSTRA problem is I don't see the STREET 2 being pulled into

table REGUH at all, and if I check inside FK03 all the fields under the STRUCTURE ADDR1_DATA.

So I'm not sure where REGUH is getting its data or how to get my extra street information onto the SAPscript

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

REGUH is the table gets updated after you RUN FI transaction (F110), which is being used for vendor payment.

When ever payment done to SAP through this transaction program picks data from vendor master and put comon required details in this REGUH table.

Now if you want any extra vendor details then what you can do is in driver program write a step to fetch DATA from LFA1, LFB1 or ADRC and ADDR tables based on LIFNR of REGUH; which ever is relevent to your requirement.

I think in this case you need to get address number first for REGUH-lifnr and after that put this address number in ADDR or ADRC or LFA1 table and assign variable to text element in sap script, so you will get your value.

Regards,

Umang Mehta

Former Member
0 Kudos

Ok I found the data I'm looking for in table ADRC field STR_SUPPL1 thank you

I've only really worked with smartforms and just learned how to do this on the smartforms

I think it will work the same here but I don't know where to put it in at

I need to declare the WA_ADRC type ADRC

also use a select single to get the data from ADRC

then assign insert the field into my address window.

this is what I did in the smartforms (i was using t005x in my smartform but this should do the same thing right?)

data: WA_ADRC type ADRC

select single * from ADRC into WA_ADRC where ADDRNUMBER = REGUH-ZADNR

then put the field WA_ADRC-STR_SUPPL1 into one of the lines for my check address window

but where do i type all that do I create COMMAND LINES (/:) in the text editor of the window?

brad_bohn
Active Contributor
0 Kudos

Just be careful with that approach because what the other poster indciated isn't entirely true. If you use one-time vendors for payments, the data does not come from the vendor master nor does it come from the address number stored in the REGUH table field (and the payee's address number isn't populated). You'll need to make sure you handle one time vendors appropriately.

If you want to specify the address lines manually in a text element node, you can switch to 'Editor' mode (paper & pencil button) and enter the commands directly.

Former Member
0 Kudos

My Finance guys tell me that when that happens they are still setup in XK01 would that solve that issue?

Former Member
0 Kudos

One time vendors are one time vendors because they are not set up in XK01. However, you will probably find a generic one time vendor maintained there. The process when entering an invoice is to enter this generic vendor number in the vendor number and the transaction will take you to a screen where you enter name and address information.

This information is storedin BSEC. So you may want to have a look there.

Rob

Former Member
0 Kudos

Ok so I put the select single statement if with the text inside my window using the /: for each line but that didn't seem to work.

I changed the same if statement that was already there to say

IF &WA_ADRC-STR_SUPPL1& NE ' '

____Order Of </>&REGUH-ZSTRA&

____,,&wa_adrc-str_suppl1&

ELSE

___Order Of </>&REGUH-ZSTRA&

But I go the same output as before where the if statement was dependent on REGUH-ZSTRA NE ' '

i read somewhere that in the code there's something like this

/:ADDRESS DELIVERY TYPE t PARAGRAPH a PRIORITY p LINES 1

where the lines sets how many lines can be printed

Problem is that the city/state/zip print after the address lines to make the 3rd line

but i'm not sure where to look for that (and I don't think the number of lines is the problem but I could be wrong it's happened before)

so I have to assume that the select statement is not pulling data for whatever reason

any ideas?

brad_bohn
Active Contributor
0 Kudos

I'm still a bit confused by your approach since it seems that you're referring to the ADDRESS command but the only thing you show in your example is a direct field output.

As far as the 'Pay to...' line goes, though I'm not familiar with your specific design, since it seems that you're working with blank check stock, let me recommend that you separate the 'Pay to' text window from the actual payee information with the name & address. In your payee address window, you would use the address command similar to the following:


/:	 	ADDRESS PARAGRAPH L8
/:	 	  NAME        &REGUD-ZNM1S&, &REGUH-ZNME2&, &REGUH-ZNME3&, &REGUH-ZNME4&
/:	 	  STREET      &REGUH-ZSTRA& &WA_ADRC-STR_SUPPL1&
/:	 	  POBOX       &REGUH-ZPFAC& CODE &REGUH-ZPST2&
/:	 	  POSTCODE    &REGUH-ZPSTL&
/:	 	  REGION      &REGUH-ZREGI&
/:	 	  CITY        &REGUH-ZORT1&, &REGUH-ZORT2&
/:	 	  COUNTRY     &REGUH-ZLAND&
/:	 	  FROMCOUNTRY &T001-LAND1&
/:	 	ENDADDRESS

Now I realize that your case is a bit different in that you have 2 streets but won't want them to appear on the same line, so you may want to play with moving the first street value up to the name line. The values wrap as well if too long.

You can use additional specifications such as LINES to control the output. You'll want to refer to the help files.

Former Member
0 Kudos

Ok but if I didn't pull any data into WA_ADRC-STR_SUPPL1 in the code I wrote already then I probably won't pull any data this way either will I? I think I've missed something somewhere and it's just not pulling the data from the table.

Answers (0)