cancel
Showing results for 
Search instead for 
Did you mean: 

how to declare table fields in global definition in smartforms

former_member381412
Participant
0 Kudos

Hiiii all 'smart forms' gurus...

how to declare table fields in global definition wat is to rite under variable name and associated type..

exp :

tabe name REGUP

field name : ZALDT

Please give me idea how to define global data....plz give me suitable example.

thanks in advance

regards,

richa

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Richa,

As per you post i understand you are trying to declare table fields in global definition,

refer to the following if this does not clear your doubts please revert back.

whatever you declare in the global data you can use those variables in the entire smart form logic (Program lines etc...)

if u want to declare a work area you can declare like

WA_TEST(Variable) TYPE EKKO (Associated Type).

This will create a global Work area called "wa_test like ekko " which u can use in the smart form .

if u want to declare a table feilds you can declare like

ZALDT(Variable) type regup-bldat(Associated Type).

Regards,

Kalyan TC.

former_member381412
Participant
0 Kudos

Dear Kalyan,

thanks for the response

i want to defined Document / Date (&wa_regup-bldat&) but i m getting this warning error

field wa_regup-bldat has no defined value...how to solved this warnings error.

regards'

richa

0 Kudos

Hi Richa,

have you declared a structure WA_REGUP in global definitions?

eg: wa_regup type regup

are u passing/fetching any values in to this structure?

if you are using this structure in the code lines/ program lines please declare(wa_regup) in the i/p and o/p parameters of it.

if you have done everything correctly and still giving

"field wa_regup-bldat has no defined value...how to solved this warnings error." as said by you.

in the initialization tab in the i/p and o/p parameters declare field "wa_regup-bldat".

hope this solves your problem....

reward points to the posts that helped you.

Regards,

Kalyan TC

nabheetscn
Active Contributor
0 Kudos

Ignore the warning as it may not be assigned any value., Yeah if error is there please declare your work are globally. Plus if you are using it in coding line than you have to mention this area in import/export parameters in code window depending on your need.

Nabheet

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Richa,

The above threads explains how to declare a variable, structure and table in the global definition of a smartform. So I am not commenting on that.

Regarding your query about the warning, the variable you declared is used in the text for printing, but may not be passing any values in program lines explicitly. (Example : Declaring a structure and using it inside a table to print the values) . In such cases, smartform could not recognize the values passing to the variables and it gives the warning as ' Field <Variable name> has no defined values'. This warning does not create any issues in the execution and can be ignored.

If we need to remove the warning, we can write a clear statement for the parameter in any program lines or in initialization. While doing so, we will use the parameter in the 'Output parameters' of the program line. When the smartform executes the check it will think the variable is filled in the program line andavoid the warning message.

Thanks and Regards

Raghesh R S