0

I am trying to change a part of form that was already created, and more specifically the sender address that is on the head of the form. In the requirements of the changes that need to be done, it is said to take the address from the accounting area(Buchungskreis) '0055'. The form is shown below:

enter image description here

The goal is to change the shipper address which includes the Name of the company, Street, Postcode, City and Country. The form that has been created has the following structure:

enter image description here

Now I am not sure where should the change be done, so in the form or the program itself. The code of the form that is used on the shipper part of the form is:

/*      ,,<H1>&ZSDSADR-NAME1&</>
/*      ,,<H1>&ZSDSADR-LAND1&&'-'ZSDSADR-PSTLZ& &ZSDSADR-ORT01&
/*      ,,Tel:,,&ZSDSADR-TELF1&
/*      ,,Fax:,,&ZSDSADR-TELFX&</>
SB      <H5>Shipper:</>
SB      &ZSDSADR-NAME1& &ZSDSADR-NAME2& &ZSDSADR-NAME3& &ZSDSADR-NAME4&
SB      &ZSDSADR-STRAS&
SB      &ZSDSADR-PSTLZ& &ZSDSADR-ORT01&&'-'ZSDSADR-ORT02&, Germany
/*      ADDRESS DELIVERY PARAGRAPH SB
/*        STREET   &ZSDSADR-STRAS&
/*        POBOX    &ZSDSADR-PFACH& CODE &ZSDSADR-PSTL2& CITY &ZSDSADR-PFORT&
/*        POSTCODE &ZSDSADR-PSTLZ&
/*        CITY     &ZSDSADR-ORT01&, &ZSDSADR-ORT02&
/*        REGION   &ZSDSADR-REGIO&
/*        COUNTRY  &ZSDSADR-LAND1&
/*        FROMCOUNTRY &ZSDSADR-LAND1&
/*      ENDADDRESS
/*      GERMANY
/*      &'Tel: 'ZSDSADR-TELF1(C)&&' Fax: 'ZSDSADR-TELFX(C)&
/:      INCLUDE ZVGF_TEL_ZET5 OBJECT TEXT ID ZVGF PARAGRAPH SB

And the part of the code in the program that is used to declare the table ZSDSADR is:

CALL FUNCTION 'ADDR_GET'
    EXPORTING
      address_selection = addr_selection
      address_group     = '    '
    IMPORTING
      sadr              = zsdsadr
    EXCEPTIONS
      OTHERS            = 1.
  IF sy-subrc NE 0.
    CLEAR zsdsadr.
  ELSE.
    SELECT SINGLE landk FROM t005 INTO zsdsadr-land1
      WHERE land1 = zsdsadr-land1.
  ENDIF.

  vbdkl-sland = zsdsadr-land1.
  MOVE-CORRESPONDING zsdsadr TO zsdsadr.

Please do tell me if you need further information.

Thank you all in advance!

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Frank
  • 153
  • 3
  • 17
  • How do you get the value of `ADDR_SELECTION` and where should you take the new address (please describe in details what means "take the address from the accounting area(Buchungskreis) '0055'"). – Sandra Rossi Dec 02 '21 at 14:43
  • so where are you stuck? what have you tried so far? – Suncatcher Dec 03 '21 at 16:03

1 Answers1

2

SAPScript forms and their calling programs are, compared to SmartForms or Adobe Forms, tightly coupled. If the program is only used for this form or if the shipper address should be changed for all forms that are printed with this program, I'd definitely make the change in the program, not the form. Much easier and also much better to understand if you look at the program and form in a year or two.

That being said, the accounting area itself doesn't have an address attached to it.

Dirk Trilsbeek
  • 5,873
  • 2
  • 25
  • 23