Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Form - Perform and ABAP coding

Hi:

I have a requirement to get vendor address from database and print on the form. I could print only one field only Name1, but not details like Street or country Etc are not getting printed. Even if we pass multiple variables as input and putput variables using perform of form, I think we need to declare only one input as INTTAB STRUCTURE ITCSY and one out put variable as OUTTAB STRUCTURE ITCSY in the ABAP program. In the program I am using Index option like 1, 2 and modifying details of OUTTAB. Is it correct?.

Still I am unable to print complete address on the form.

For this I am unsing Perfom option in the form.

Can you please help in the following:

1) Can I pass one value vendor from form using perform and get back a structure from ABAP program?.

2) I am using following:

DEFINE &VENDOR_NAME& = ' '

DEFINE &VENDOR_STREET& = ' '

PERFORM GET_DATA IN PROGRAM Z_TEST

USING &VENDOR_NO&

CHANGING &VENDOR_NAME&

CHANGING &VENDOR_STREET&

ENDPERFORM.

For Printing I am using inthe form

&VENDOR_NAME&

&VENDOR_STREET&

In the ABAP program I am using

FORM GET_DATA TABLES INTTAB STRUCTURE ITCSY

OUTTAB1 STRUCTURE ITCSY.

IF SY-SUBRC EQ 0.

SELECT SINGLE NAME1 STR_SUPPL1

FROM ADRC

INTO (V_NAME1,V_STR_SUPPL1)

WHERE ADDRNUMBER = V_ADRNR.

IF SY-SUBRC EQ 0.

*

*- Name1

READ TABLE OUTTAB1 INDEX 1.

MOVE V_NAME1 TO OUTTAB1-VALUE.

MODIFY OUTTAB1 INDEX SY-TABIX.

*

*- Street

READ TABLE OUTTAB1 INDEX 2.

MOVE V_STR_SUPPL1 TO OUTTAB1-VALUE.

MODIFY OUTTAB1 INDEX SY-TABIX.

ENDIF.

Can you please check above code and let me know if I am doing mistake anywhere?..like passing variables, printing variables on the form and ABAP sub-routine etc.

Please do not copye again same code what is find in SAP ABAP help.

Thanks in advance for your help.

Thanks,

Rama

Former Member
Not what you were looking for? View more on this topic or Ask a question