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: 

Smartform Query about passing a value from print prog to layout

Former Member
0 Kudos

Smartform Gurus

I have one window for printing "Invoice No" and "Invoice Date " . How do i pass these values plz . tell me ?

I will definitely give points whoever attempts plz

Thnx

4 REPLIES 4

christian_wohlfahrt
Active Contributor
0 Kudos

Hi,

relevant data is read by program RLB_INVOICE and transferred to smartform via complex structure lbbil_invoice. So number and date are taken from VBRK (VBELN and ERDAT or something nearby).

Your problem seems to be output customizing. Define in SPRO message determination for a message type and create a message condition (e.g. with transaction NACE). There is also definition of message, output program and smartform.

Regards,

Christian

0 Kudos

Hi Cristian

I m trying to run this prog RLB_INVOICE but its not running .Could u plz tell me how to run these print program .

Thnx

Former Member
0 Kudos

You need to mention some more information:

a) Is it a custom print program ?

b) Is it a custom smartform ?

If answer to both is yes, then

a) First you need to create your parameters in your custom SMARTFORM in FORM Interface

b) Call <b>SSF_FUNCTION_MODULE_NAME</b> and pass your form routine, it returns the name of the function module

c) Call the returned function module and pass the parameters that you want to display in SMARTFORM ?

You should refer http://help.sap.com for more information about SMARTFORMS. It is very well explained in there.

Also search for Message Output in http://help.sap.com

Regards,

Subramanian V.

christian_wohlfahrt
Active Contributor
0 Kudos

Hi!

You can't run print programs - they are just a group of routines. The routine 'entry' will be called by output determination, so you (or someone else) will have to do the output customizing for billing documents.

To get a quick result, try following report:


TABLES: nast.
DATA: return_code TYPE syst-subrc,
      us_screen  TYPE xflag.

PARAMETERS: p_vbeln LIKE vbrk-vbeln.

INITIALIZATION.
  p_vbeln = '0090115726'.  "any billing doc. number

START-OF-SELECTION.

  nast-objky = p_vbeln.
  nast-parnr = '0002010633'.  "use VBRK-KUNAG
  nast-kappl = 'V3'.
  nast-spras = 'E'.
  nast-parvw = 'RE'.
  nast-kschl = 'RD00'.        "message type

  PERFORM entry(RLB_INVOICE)
              USING
                 return_code
                 us_screen.

Have a look in table NAST, with KAPPL = 'V3' to get some example values! In field OBJKY you will find invoice numbers, which are input param of transaction VF03.

To create new output message, you should follow the steps in SPRO->Sales and Distribution->Basic Functions->Output Control->Output Determination->Output Determination Using the Condition Technique->Maintain Output Determination for Billing Documents

You can skip Maintain Condition Tables, but under Maintain Output Types your own message name (KSCHL in report above) has to be defined; in other lines assignments have to be done - follow the help.

Alternatively you might change existence output message and just assign your print program in Maintain Output Types->Processing routines.

'Running' the program can be done with transaction VF03, entry screen, menue: billing document->Issue output to->Screen. Select your message type and printer (LOCL).

Regards,

Christian