This website is not affiliated with, sponsored by, or approved by SAP AG.

Pint table value in Smartform

Development SAPscript/ Smartforms

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Pint table value in Smartform

Postby Sapslzr » Mon Jan 30, 2012 7:02 pm

I have a Z program that creates a file with the invoice text data.

Some extra data is requiered so I am creating a new program. And one of the changes is also to create the file with a Smartform.

I have to send the values of our customer to an internal table and print them (since some values are edited in the invoice and not taken from the master sales data).

I have the following node code:

Code: Select all
    SELECT SINGLE *
    FROM vbrk
    INTO w_vbrk
    WHERE vbeln = vbeln.


What do I have to do to print values on Smartform with text variable, for example: &W_VBRK-KUNAG&

I have been trying with different declarations in Form Types, Global Data, code, and just getting all kinds of errors, I am lost.

If someone can please point me the general steps I have to print this.

Regards,
Carlos
Meditate Everyday
Sapslzr
 
Posts: 119
Joined: Sat Oct 24, 2009 11:43 am

Re: Pint table value in Smartform

Postby Gothmog » Tue Jan 31, 2012 7:58 am

You just have to create a text element with the variable name (&W_VBRK-KUNAG&) in it.
Where exactly is the problem ?
68 74 74 70 3a 2f 2f 74 69 6e 79 75 72 6c 2e 63 6f 6d 2f 62 64 6f 37 6d 77 67
Gothmog
 
Posts: 1942
Joined: Wed Sep 12, 2007 4:46 am
Location: Probably not home

Re: Pint table value in Smartform

Postby Sapslzr » Wed Feb 01, 2012 10:13 am

Thank you for the help Gothmog, right now I am trying to figure out what is going on, since I can not even print &VBRK-VBELN&.

Althought if I take one of the standard fields from the list like &IS_BIL_INVOICE-HD_GEN-SOLD_TO_PARTY& it works and prints the value.

Regards,
Carlos
Meditate Everyday
Sapslzr
 
Posts: 119
Joined: Sat Oct 24, 2009 11:43 am

Re: Pint table value in Smartform

Postby Gothmog » Wed Feb 01, 2012 10:19 am

In your smartform text element, you only have access to the smartform data, not the calling program.
you'll have to pass the values through the smartform interface, or declare them in the smartform global data (and get their value in the smartform code).
How was your W_VBRK declared ? Localy in the code node ?
68 74 74 70 3a 2f 2f 74 69 6e 79 75 72 6c 2e 63 6f 6d 2f 62 64 6f 37 6d 77 67
Gothmog
 
Posts: 1942
Joined: Wed Sep 12, 2007 4:46 am
Location: Probably not home

Re: Pint table value in Smartform

Postby Sapslzr » Wed Feb 01, 2012 5:36 pm

I want it to be an internal table where I can dump the values of the invoice header from VBRK.

I entered:

W_VBRK TYPE VBRK in global definitions and nothing.
W_VBRK LIKE VBRK in global definitions and nothing.

I then tried

w_vbrk LIKE VBRK OCCURS 0 WITH HEADER LINE in the code node, with the second statement but I got: W_VBRK has already been declared.

If I cut the global definitions row, I get error: The field W_VBRK is unknown.

Regards,
Carlos
Meditate Everyday
Sapslzr
 
Posts: 119
Joined: Sat Oct 24, 2009 11:43 am

Re: Pint table value in Smartform

Postby Rich » Mon Feb 27, 2012 5:21 am

In the definition of the node are you entering w_vbrk as one of the parameters ?
Regards

Rich

Image
Abap KC:http://www.richard-harper.me.uk/Kb
SFMDR:http://www.se37.com
Rich
 
Posts: 7112
Joined: Thu Oct 31, 2002 4:47 pm
Location: Liverpool


Return to SAPscript/Smartforms

Who is online

Users browsing this forum: No registered users and 4 guests





This website is not affiliated with, sponsored by, or approved by SAP AG.