cancel
Showing results for 
Search instead for 
Did you mean: 

How to insert data in a smarforms?

former_member384574
Active Participant
0 Kudos

Good morning to everybody!

I've a smartform with a header, in this header there're some fields that I've to fill with some data of the table HRPY_WPBP, I don't know how to insert the data in the field, I've read through internet I need to put before the field something like this, for example, for the field PERNR If I want to write it I've to put:

FIELD_PERNR: &HRPY_WPBP-PERNR& Is this correct? Actually this doesn't work... I need a loop to the table? Where can I write this?

Please Help And sorry for my bad english!

Regards

Rebeca

Edited by: Rebeca R on Jun 23, 2008 10:48 AM

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member206377
Active Contributor
0 Kudos
former_member384574
Active Participant
0 Kudos

Thanks very much! I think this can solve my problem!

Thanks a lot!

Regards,

Rebeca

Former Member
0 Kudos

Hi Rebeca,

U want to define Table HRPY_WPBP in Global settings-->Form Interface and select Tables Tab,

Then declare internal Table like

ITAB LIKE HRPY_WPBP

Now Place this field &ITAB-PERNR& in SMARTFORM where u want.

In Print Program Select Data Like

SELECT PERNR

FROM HRPY_WPBP

INTO TABLE ITAB.

Use this ITAB in FUNCTIONMODULE.

raymond_giuseppi
Active Contributor
0 Kudos

In the text node use the syntax &HRPY_WPBP-PERNR&,

If HRPY_WPBP is not an input parameter of the form (Global Settings, Form interface) define it (Global Settings, Global definitions, Global Data) and fill the data in the Initialization (Global Settings, Global definitions, Initialization) or in a program node before the text node, in both case provide with the necessary input parameter and declare HRPY_WPBP as an output parameter.

(Look at [SAP Smart Forms (BC-SRV-SCR)|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf]

Regards

former_member384574
Active Participant
0 Kudos

Thanks, but the problem is how to reference the table into the field.... I don't know how to put the Global definitions and the Interfase.... I need something step by step...

Thanks very much

Regards

Rebeca