Application Development and Automation 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: 
Read only

Text Element in smartform not displaying value

Former Member
0 Likes
6,156

Hi Experts,

I have come across a strange scenario wherein the variable in which i have the value to be displayed in the smartform is not being displayed in the text element. I have written the below code:

   DATA: ls_payment_terms TYPE coms_topis,
       ls_transferred_date type BDH_WRK.
*       ls_date type dats.

READ TABLE bdh_payment_terms INDEX 1 INTO ls_payment_terms.

ls_date = ls_payment_terms-days + BDH-TRANSFER_DATE.

I have given the output date as output parameters and I have declared it in global definition with type DATS.

Now that I have the value in ls_date, i have passed it on to the text element as <N6>&ls_date& </>.

However, this date is not getting displayed in the invoice. What could be the reason?please help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,957

What it is displaying?????

Did u written those lines in EDITOR->command propmt right(insert command( like +ve symbol in left side)->symbol)?????

if you not written within command ,then new editor will take as text only.for ex &val& will display like &val& only,not the value of val.

Thank you

Message was edited by: lingaraj desai

Hi Experts,

I have come across a strange scenario wherein the variable in which i have the value to be displayed in the smartform is not being displayed in the text element. I have written the below code:

   DATA: ls_payment_terms TYPE coms_topis,
       ls_transferred_date type BDH_WRK.
*       ls_date type dats.

READ TABLE bdh_payment_terms INDEX 1 INTO ls_payment_terms.

ls_date = ls_payment_terms-days + BDH-TRANSFER_DATE.

I have given the output date as output parameters and I have declared it in global definition with type DATS.

Now that I have the value in ls_date, i have passed it on to the text element as <N6>&ls_date& </>.

However, this date is not getting displayed in the invoice. What could be the reason?please help.

7 REPLIES 7
Read only

Former Member
0 Likes
2,957

Hi

Pls put break point in the Smartform function module for below statement and check the value of LS_DATE.

ls_date = ls_payment_terms-days + BDH-TRANSFER_DATE.

Thanks,

Chandra

Read only

former_member585060
Active Contributor
0 Likes
2,957

Hi,

     You must have written the text element 'ls_date manually,  In smartforms the variables have to be selected from Field List and drag to the window where we need to display.

Just open the window in which you want to display the 'ls_date', click on the General Attributes tab, click Ctrl+Shift+F4 to display Fields list(Left side bottom), from the Field List select the 'ls_date' field and drag into the window where you want to display..

Thanks & Regards

Bala Krishna

Read only

former_member16553
Active Participant
0 Likes
2,957

Hi

    Have you debug and checked that data is coming in the variable or not..

   and could you please let me know  where you write the code for it..

Read only

0 Likes
2,957

Hi Girdhari,

I debugged and Checked. The data is appearing in the variable. The code is written in the program lines in a window inside the smartform.

Read only

Former Member
0 Likes
2,958

What it is displaying?????

Did u written those lines in EDITOR->command propmt right(insert command( like +ve symbol in left side)->symbol)?????

if you not written within command ,then new editor will take as text only.for ex &val& will display like &val& only,not the value of val.

Thank you

Message was edited by: lingaraj desai

Read only

Former Member
0 Likes
2,957

Hi Neena,

You Can check at below point.

1) check where u r calculating is_date. Is ur getting correct value . Write Breakpoint just before IS_DATE calculation.

ls_date = ls_payment_terms-days + BDH-TRANSFER_DATE.

2) Before printing check have u written any clear statement , It means check the value just before display .

3) don't write manually ls_date , try to drag from field list .

Once you check all above i think ur problem solved

Cheers

Yukti 

Read only

0 Likes
2,957

Hi.

I fixed this problem by running a patch that I have for versions prior to SAP. If anyone wants, send me an email: [email protected]


Regards,