cancel
Showing results for 
Search instead for 
Did you mean: 

Issues in displaying table values in script

Former Member
0 Kudos

Hi all,

I am working on a SAP script of shop papers. There exists a standard script 'PM_COMMON' and standard print program 'RIPRJT00'.

My requirement is to copy these into Z scrpt and Z print program and display additional fields in the script. In that i need to display main window data in table format.

So, in print program, i have fetched the values and anf inside the loop i am calling 'Write_form' for this window. But these values are not getting printed in my script. Print program is fetching values. But inside script, it is blank.

So, can anybody suggest me some solution on this issue?

Thanks,

Archana

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

I deleted my print program and copied the standard print program again. I retained the logic of retrieved values and the issue is resolved.

Thanks,

Archana

Former Member
0 Kudos

Config settings were changed to utilize new driver and new SAPScript. Previous poster is correct; SAP best practice is to use a Z-version of the SAPScript, add PERFORM routines, and leave the driver program as it is.

Former Member
0 Kudos

Hi,

Is the Z script and the print program configured in NACE ?

Can you please the paste the code,, how you calling your write form within loop ?

Regs,

Lokesh.

Former Member
0 Kudos

Hi,

LOOP AT I_FINAL INTO WA_FINAL.
    MOVE-CORRESPONDING WA_FINAL TO RESBD.
    CALL FUNCTION 'WRITE_FORM'
      EXPORTING
        ELEMENT = 'MATERIAL'
        WINDOW  = 'MAIN'.
  ENDLOOP.                       " loop on materials

This is the code i am using to display my main window table values.

Configuration is already done. Only this table values are not coming. Other data is coming correctly.

Thanks,

Archana

Former Member
0 Kudos

Please Ensure that you have not closed the FORM , before calling your text element.

You can activate the script debugger and check whether control is being passed to the text element or not.

Thanks,

Raghavendra

Former Member
0 Kudos

I know you might have done these steps already but for one more time check.

1. Put the break-point call function write_form.. Check the value of structure RESBD . Is it getting populated?

2. If yes then it must be an SAP script editor formatting issue.. Pls check the editor coding for Material element..

Like the tag foamats are right or not... something like below:

PA &RESBD-RSNUM& ,,&RESBD-RSNUM& ,,&RESBD-RSAR&

Pls check if there is any condition might be there for printing the item lines (Script editor in MATERIAL element)

3. Pls also check which version of language you are calling via your print program.

Regards,

Lokesh.

Former Member
0 Kudos

Hi Raghavendra,

I am not closing my form before calling my text elemnet.

Even my text element is getting called, but only blank lines are coming. In print program , values aer visible but once it goes to script, values disappear.

Former Member
0 Kudos

Hi lokesh,

I have done all those checks. Everything is getting populated in print program. But not in script.

I am defining the values in script correctly.

Any other suggestions?

Thanks,

Archana

Former Member
0 Kudos

Hi Arcahna,

It is very strange.. I strongly belive that the problem is only with script formatting.. I wud suggest try to dubug the flow where it is getting disappeared.

Can you please paste the code that you are passing in script editor.. Pls send me right from start like from start of that Form element MATERIAL.

former_member188005
Contributor
0 Kudos

Archana,

No need of copying the standard print program for additional data. You can write a subroutine in SE38 (ABAP Editor as executable program) and then call the subroutine in SAP Script for processing and displayingt the additional data.

Regards.