how to input parameter value into script?

Development SAPscript/ Smartforms

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Post Reply
kkktank
Posts: 13
Joined: Mon May 26, 2008 8:29 am

how to input parameter value into script?

Post by kkktank » Wed Aug 27, 2008 10:37 pm

Code: Select all

TYPES: BEGIN OF HEADER,
        VBELN LIKE VBAK-VBELN,
  END OF HEADER.
DATA HEADER TYPE HEADER.
HEADER-VBELN = '12345'.
In window 'header'
/E FIRST_LINE
T1 SO No.:,, &HEADER-VBELN&,,

Code: Select all

  CALL FUNCTION 'WRITE_FORM'
   EXPORTING
     ELEMENT                        = 'FIRST_LINE'
     WINDOW                         = 'HEADER'
            .
Why no VBELN output ?
When I debug into the script, I found the &HEADER-VBELN& has no value.

In smartforms, the field symbol must be add by the 'add field' button but I found no differnce in Script.

abap_doctor
Posts: 6955
Joined: Thu Mar 25, 2004 11:29 am
Location: Airstrip One

Re: how to input parameter value into script?

Post by abap_doctor » Thu Aug 28, 2008 3:02 am

Have you taken a look at FM: TEXT_SYMBOL_SETVALUE? 8)

But I seem to remember this wasn't required, and your method was sufficient... :?
The Doc
Tuly Idiot Magna Grand Docot Image

wilhitern1
Posts: 135
Joined: Thu May 15, 2008 4:25 pm
Location: Butterball LLC., Goldsboro, NC, USA
Contact:

Re: how to input parameter value into script?

Post by wilhitern1 » Tue Sep 02, 2008 3:51 pm

I don't remember when non-main windows occur. Perhaps at open. All non-main windows print on their own at a specific time. Only main needs to be called as I remember.
Neal Wilhite (WilhiteRN1)Image

kkktank
Posts: 13
Joined: Mon May 26, 2008 8:29 am

Re: how to input parameter value into script?

Post by kkktank » Tue Sep 02, 2008 9:35 pm

wilhitern1 wrote:I don't remember when non-main windows occur. Perhaps at open. All non-main windows print on their own at a specific time. Only main needs to be called as I remember.
The fields did have value before openning the form. And I think the non-main windows will be printed by the commands of program.
I think this is only a little tiny problem, but rather annoying me. :twisted:

wilhitern1
Posts: 135
Joined: Thu May 15, 2008 4:25 pm
Location: Butterball LLC., Goldsboro, NC, USA
Contact:

Re: how to input parameter value into script?

Post by wilhitern1 » Wed Sep 03, 2008 7:53 am

What version are you on?

Is the print program too big to post?

When it runs, do you see "T1 SO No.:" with no number or do neither print?
Neal Wilhite (WilhiteRN1)Image

Post Reply