Skip to Content
0
Former Member
Jan 17, 2008 at 07:45 AM

Ship to Party address is missing country name in SAPScript FORM

109 Views

Hi All,

i had modified the form for displaying the address of the Ship - to - party address, but the country name is missing in the FORM output, can any body suggest a solution for this..

here is the code that i had written...

FORM get_addr TABLES intab TYPE t_intab

out_tab TYPE t_outtab.

DATA : wa_intab LIKE itcsy,

w_outtab LIKE itcsy.

DATA v_adrnr_we TYPE adrc-addrnumber.

READ TABLE intab INTO wa_intab INDEX 1.

v_adrnr_we = wa_intab-value.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = v_adrnr_we

IMPORTING

output = v_adrnr_we.

SELECT SINGLE * FROM adrc WHERE addrnumber = v_adrnr_we.

READ TABLE out_tab INTO w_outtab WITH KEY name = 'Z_NAME1'.

IF sy-subrc EQ 0.

w_outtab-value = adrc-name1.

MODIFY out_tab FROM w_outtab INDEX sy-tabix.

ENDIF.

READ TABLE out_tab INTO w_outtab WITH KEY name = 'Z_NAME2'.

IF sy-subrc EQ 0.

w_outtab-value = adrc-name2.

MODIFY out_tab FROM w_outtab INDEX sy-tabix.

ENDIF.

READ TABLE out_tab INTO w_outtab WITH KEY name = 'Z_NAME3'.

IF sy-subrc EQ 0.

w_outtab-value = adrc-name3.

MODIFY out_tab FROM w_outtab INDEX sy-tabix.

ENDIF.

READ TABLE out_tab INTO w_outtab WITH KEY name = 'Z_NAME4'.

IF sy-subrc EQ 0.

w_outtab-value = adrc-name4.

MODIFY out_tab FROM w_outtab INDEX sy-tabix.

ENDIF.

READ TABLE out_tab INTO w_outtab WITH KEY name = 'Z_STREET'.

IF sy-subrc EQ 0.

w_outtab-value = adrc-street.

MODIFY out_tab FROM w_outtab INDEX sy-tabix.

ENDIF.

READ TABLE out_tab INTO w_outtab WITH KEY name = 'Z_CITY1'.

IF sy-subrc EQ 0.

w_outtab-value = adrc-city1.

MODIFY out_tab FROM w_outtab INDEX sy-tabix.

ENDIF.

READ TABLE out_tab INTO w_outtab WITH KEY name = 'Z_CITY2'.

IF sy-subrc EQ 0.

w_outtab-value = adrc-city2.

MODIFY out_tab FROM w_outtab INDEX sy-tabix.

ENDIF.

CLEAR adrc.

ENDFORM. "GET_ADDR

and in the form editor it was like this.....

PERFORM GET_NAME IN PROGRAM ZSD_SDPACKLI

USING &VBPLA-ADRNR_WE&

CHANGING &Z_NAME1&

CHANGING &Z_NAME2&

CHANGING &Z_NAME3&

CHANGING &Z_NAME4&

CHANGING &Z_STREET&

CHANGING &Z_CITY1&

CHANGING &Z_CITY2&

ENDPERFORM

ADDRESS DELIVERY PARAGRAPH AS\

NAME &Z_NAME1&, &Z_NAME2&, &Z_NAME3&, &Z_NAME4&

STREET &Z_STREET&

CITY &Z_CITY1&, &Z_CITY2&

POSTCODE &VBPLA-PSTLZ_WE&

COUNTRY &VBPLA-LAND1_WE&

REGION &VBPLA-REGIO_WE&

FROMCOUNTRY &VBPLA-LAND1_VST&

ENDADDRESS

Thanks in advance..!