cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in sapscript to get the data from out side program

Former Member
0 Kudos

Hi,

I am using the perform to get the data from the outside.so i am using perform as follows.

/E 2040

/* SET DATE MASK = 'YYYY

/: DEFINE &I_SGTXT&

/: PERFORM GET_TEXT IN P

/* USING &RFDUZI01-WRSHB

/: USING &RFDUZI01-BELNR

/* USING &RFDUZI01-KUNNR

/: CHANGING &I_SGTXT&.

/: ENDPERFORM

and in the programe i am writing the code as follows.

REPORT ZSGTEXT_FORM .

FORM GET_TEXT TABLES IN_TAB STRUCTURE ITCSY

OUT_TAB STRUCTURE ITCSY.

data: i_xblnr like bsid-xblnr,

i_sgtxt type sgtxt.

*select kunnr belnr from bseg into table in_tab where belnr =

  • select belnr bukrs from bseg into table in_tab.

  • Get first parameter in input table.

READ TABLE IN_TAB INDEX 1.

WRITE IN_TAB-VALUE TO i_xblnr .

SELECT single

sgtxt from bsid into out_tab-value

WHERE xblnr = i_xblnr .

*READ TABLE out_tab INDEX 1.

*

*out_tab-value =

*i_sgtxt.

*

*MODIFY out_tab INDEX 1.

*

endform.

from the above code i am able to get the value in out_tab-value.But the same value is not dispalying in the sap script.Can you please correct it if possible.

Thanks,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

The problem is the section you've commented out. All you are doing at the moment is putting data in the header of table out_tab.

Try;


READ TABLE out_tab INDEX 1.
SELECT single
sgtxt from bsid into out_tab-value WHERE xblnr = i_xblnr .

MODIFY out_tab INDEX 1.

Regards,

Nick

Answers (0)