cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete a line in smart forms

Former Member
0 Kudos

Hi all

i have data in my itab in following format

Month 1 2 3 4 5 6 7 total

nov a a a a a a a 7a

dec P A P P A p A 4p

3a

i have to print data from col month to 7 in main area of the table in smart forms but it shows the 3rd line as well(an empty extra line) . is there any way that i may be able to delete or truncate third line ? as i have to print total below some where.

Regards

Ammad

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Ammad

i have a solution to ur question.

well u only want to print a line in the smartform Main window table if u have data in the first field of ur internal table lets take name as T_FINAL.

So u want to print lines in Smartform if T_Final-Field1 (which for month) is not empty.

For this go to the Condition tab of the Line (ROW) inside ur MAIN AREA In TABLE which must be there in any window probably in the Main window.

Double click on the Line (ROW) in MAIN AREA, It will contain 2 tabs Output option and Condition.

Click On condition and write under FIELD NAME the field of ur internal table WA u r using in TABLE for eg T_Final-Field1 if its Internal table with header line or if u r using a separate Work area use the work area like WA_Final-FIELD1, then click on the Square button just in front of it to select an RELATIONAL OPERATOR , put there the RELATIONAL OPERATOR as "Not Equal to" and in the comparison value column write a space quoted with single quotation as ' '.

After u do this any line encountered with its first field of WA_FINAL i.e wa_final-field1as empty wont be printed.

This Reloves ur issue.

Regards,

Akash Rana

Former Member
0 Kudos

Hi Ammad

i have a solution to ur question.

well u only want to print a line in the smartform Main window table if u have data in the first field of ur internal table lets take name as T_FINAL.

So u want to print lines in Smartform if T_Final-Field1 (which for month) is not empty.

For this go to the Condition tab of the Line (ROW) inside ur MAIN AREA In TABLE which must be there in any window probably in the Main window.

Double click on the Line (ROW) in MAIN AREA, It will contain 2 tabs Output option and Condition.

Click On condition and write under FIELD NAME the field of ur internal table WA u r using in TABLE for eg T_Final-Field1 if its Internal table with header line or if u r using a separate Work area use the work area like WA_Final-FIELD1, then click on the Square button just in front of it to select an RELATIONAL OPERATOR , put there the RELATIONAL OPERATOR as "Not Equal to" and in the comparison value column write a space quoted with single quotation as ' '.

After u do this any line encountered with its first field of WA_FINAL i.e wa_final-field1as empty wont be printed.

This Reloves ur issue.

Regards,

Akash Rana

Former Member
0 Kudos

Hi,

Have you checked the window size fitted with the internal table data.

GR

Former Member
0 Kudos

yah this is the last thing i will do but i want to control it with code . if u know some thing then do let me know

Former Member
0 Kudos

Hi

Place a condition if not initial WORKAREA is not initial then only PRint that line ..

surya

Former Member
0 Kudos

hi suryia

i did that like wa-month_name in not initial in command above the row but its not working .. any other idea ??

Regards

ammad

Former Member
0 Kudos

is there any empty lines in your internal table? if yes create one program lines in that delete empty lines from internal table based on condition...

Former Member
0 Kudos

that is not an empty line actualy it has some data in other field which is total ... i have to print total some whhere else. so i can delete my dear . tel me that how can i truncate that line in smart forms main area.