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: 

Dynamic heading based on fetch data in smartforms

Former Member
0 Kudos
652

hi all,

i am printing a smart form using driver program. i need to print 7 different headings(based on the condition) based on the fetched data in the smartform ,but the problem is i am getting same header text in all the forms. Kindly provide solution.The header text is printed in a template.

Regards

Tanveer Ahmed

1 ACCEPTED SOLUTION

thangam_perumal
Contributor
0 Kudos
222

Hi Tanveer ,

     refer below screen

Like above put your condition on every text elements.

execute it you will get your requirements.

Regards,

Thangam.P

11 REPLIES 11

former_member187748
Active Contributor
0 Kudos
222

Hi Tanveer,

declare a variable of type text, and you can fetch your data in header of smartform

based on your condition.

like shown below

data : lv_text type string.

loop at your table INTO your work area.

based on your condition.

IF condition.

lv_text = 'first heading'

elseif condition.

lv_text = 'second heading'

and so on.

ENDIF.

ENDLOOP.

and in the output where you are showing your header put the variable &lv_text&

Hoping this will solve your  issue.

0 Kudos
222

This message was moderated.

0 Kudos
222

Hi Tanveer,

please do it in your smartform driver program, or you can create program lines for this

within your smartforms, and please drop it from conditions tab.

If you will create this into driver program, then you have to import it in smartform.,

So better to create a program lines within smartform and use this concept.

Hoping the goal will achieved.

thangam_perumal
Contributor
0 Kudos
222

Hi Tanveer,

               have resolved problem or what?

0 Kudos
222

hi perumal,

the issue is not solved.

i have been working on this issue for past 1 week .

awaiting helpful replies.

Regards

Tanveer

0 Kudos
222

Hi ,

      where do you need to print dynamic ,based on what? could you elaborate briefly?  or else place the your screen shots..

0 Kudos
222

Hi Tanveer,

do what i have sujjested above, if still not get resolved, then please revert.

0 Kudos
222

hi perumal,

kindly find the text element , I have used these text elements in the smartform inside template.

in the conditions tab i have mentioned the conditions based on which these text elements will

be printed.

Now the problem is that i am getting same text element for all the smartforms which i dont want .

My requirement is to get different text element(preferebly based on the fetched data and condition )

0 Kudos
222

hi perumal,

kindly find the text element , I have used these text elements in the smartform inside template.

in the conditions tab i have mentioned the conditions based on which these text elements will

be printed.

Now the problem is that i am getting same text element for all the smartforms which i dont want .

My requirement is to get different text element(preferebly based on the fetched data and condition )

0 Kudos
222

ok i am trying

thangam_perumal
Contributor
0 Kudos
223

Hi Tanveer ,

     refer below screen

Like above put your condition on every text elements.

execute it you will get your requirements.

Regards,

Thangam.P