Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue Related to SAP SCript

Former Member
0 Kudos

Hi,

I am having issue related to data display in SAP Script.

In Print Program i am getting all my Internal tables & Variables filled up with data And then i Opened FORM & Then used WRITE_FORM for respective windows at this point all the data related to that particular window is available in Internal Tables/Variables.

And then it is calling SAP Script Output[SE71].

When i see data [Internal Tables & Variables] values in Debug Mode in SE71 there is absolutely no data avaiable.

This is the same case with all the WINDOWS.

In print program data is available in [Internal Tables & Variables] where as in SE71 those data are not avaiable.

Subsequently when i see the output There is no data getting printed on the output, Only BOX command's and Header's[Static] in WINDOWS are getting displayed.

Can anybody tell me what could be the issue over here.

Actually i am calling my print program's routine from another program as

<b> PERFORM f_entry IN PROGRAM zas12_sales_ord

USING v_return_code v_screen.</b>

Every thing is working correctly except data display.

Can anybody tell me what can be the issue over here!

Thanks in advance.

Thanks & Regards,

Prasad.

7 REPLIES 7

Former Member
0 Kudos

Hi just a quick reply..

Did you declare elements in your Sapsript form and in your print program.

You have declare in your sapscript an element tag so that data could be passed.

Also you should insert data enclosed by '&'

0 Kudos

Hi,

All the points mentioned in the above reply are already in place in my code.

Can anybody give me the solution for above mentioned post as i am not able to print Actual Data [Internal Tables & Variables] but i am able to print other static data as BOXES, Window Headers etc.

Can anybody give the solution!

Thanks in advance.

Thanks & Regards,

Prasad.

0 Kudos

Hi Prasad,

Can you send your code for FM write_FORM and the code where you are using that internal table values in the sapscript form

0 Kudos

Hi,

My Print Program Calling is as below:

Where text-207 is WIN1 where i am trying to print few variables data.

PERFORM f_write_form USING text-207 space.

FORM f_write_form USING p_window

p_element.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

element = p_element

window = p_window

EXCEPTIONS

OTHERS = 1.

  • No sy-subrc check

ENDFORM. " WRITE_FORM

My SE71 [SAP Script] Code is as below:

for WIN1

<b>/: BOX WIDTH '19.5' CM HEIGHT '0.75' CM FRAME 12 TW

P1 <IN>1.PROCUREMENT INSTRUMENT IDENTIFICATION(CONTRACT) No.|,, (ORDER)No.,,6.INVOICE NO./DATE ,,7.PAGE|OF,,8. ACCEPTANCE POINT</>

/: BOX XPOS '8.7' CM WIDTH 0 TW HEIGHT '0.75' CM FRAME 12 TW

/: BOX XPOS '13.3' CM WIDTH 0 TW HEIGHT '0.75' CM FRAME 12 TW

/: BOX XPOS '15.3' CM WIDTH 0 TW HEIGHT '0.75' CM FRAME 12 TW

PO <PF>&V_CONTRACT(33)&</>,,<PF>&V_ORDER_NO(8R)&,,&V_INVNO_DATE(Z)&,,&PAGE&,,&SAPSCRIPT-FORMPAGES& ,,</>&K_VBAP-ACCEPT&</b>

When i check v_contract & v_order_no in WRITE_FORM i am getting the data in debug mode in print program.

But when i check the same in SE71 in debug mode i am not been able to see the data.

Can anybody solve this critical issue!

Thanks,

Prasad.

0 Kudos

Hi,

In as per above post i am able to print BOXES & Staic text as

<b>1.PROCUREMENT INSTRUMENT IDENTIFICATION(CONTRACT) No.|,, (ORDER)No.,,6.INVOICE NO./DATE ,,7.PAGE|OF,,8. ACCEPTANCE POINT</b>

But i am not able to print dynamic data like variables

<b>v_contract & v_order_no</b>.

I have tried by adding element in Window <b>WIN1</b> that also not working.

Can anybody solve this issue.

Thanks,

Prasad.

0 Kudos

Hi,

Any Solution for the above mentioned issue/post!

Thanks,

Prasad.

0 Kudos

Hi,

Have you used the structure itcsy in the form statement. if not use itcsy structure to get the values. I am giving the example.

PERFORM F_GET_MATNR_MAKTX IN PROGRAM ZZZCR0013F

USING &LTAK-BENUM&

CHANGING &D_MATNR&

CHANGING &D_MAKTX&

ENDPERFORM

FORM f_get_matnr_maktx TABLES in_tab STRUCTURE itcsy

out_tab STRUCTURE itcsy.

CLEAR: d_matnr,

d_maktx.

READ TABLE in_tab INDEX 1.

IF sy-subrc NE 0.

CLEAR in_tab.

ELSE.

SELECT SINGLE plnbez FROM afko INTO d_matnr

WHERE aufnr = in_tab-value.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = d_matnr

IMPORTING

output = d_matnr.

ENDIF.

READ TABLE out_tab INDEX 1.

IF sy-subrc NE 0.

CLEAR out_tab.

ELSE.

out_tab-value = d_matnr.

MODIFY out_tab INDEX 1.

ENDIF.

SELECT SINGLE maktx INTO d_maktx FROM makt

WHERE matnr = d_matnr

AND spras = sy-langu.

READ TABLE out_tab INDEX 1.

IF sy-subrc NE 0 .

CLEAR out_tab.

ELSE.

out_tab-value = d_maktx.

MODIFY out_tab INDEX 1.

ENDIF.

ENDFORM.