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

Literals

Former Member
0 Likes
439

Hi Gurus!!

I wrote this case statement in the Program lines in smartform with input parameter as zvbdka and output parameter as title.

CASE ZVBDKA-VBTYP.

WHEN 'A'.

TITLE = 'Inquiry'.

WHEN 'B'.

TITLE = 'Sales Quotation'.

WHEN 'C'.

TITLE = 'Sales Order'.

WHEN 'E'.

TITLE = 'Scheduling Agreement Confirmation'.

when 'G'.

TITLE = 'Contract Confirmation'.

when 'H'.

TITLE = 'Returns'.

when 'I'.

TITLE = 'Free-of-Charge Delivery'.

WHEN 'K'.

TITLE = 'Credit Memo Request'.

when 'L'.

TITLE = 'Debit Memo Request'.

when others.

TITLE = 'Order Confirmation.

Endcase.

But, it is throwing an error message saying "literals that take up more than one line not allowed". What does that mean. Can someone help.

Thanks and Regards,

Vishwa.

3 REPLIES 3
Read only

Former Member
0 Likes
418

Better to write this code in main print program and use text variables( declare all literals with text variables then use it). Hope tis will solve your problem

Read only

Former Member
0 Likes
418

I think Here is the error

CASE ZVBDKA-VBTYP.

WHEN 'A'.

TITLE = 'Inquiry'.

WHEN 'B'.

TITLE = 'Sales Quotation'.

WHEN 'C'.

TITLE = 'Sales Order'.

WHEN 'E'.

TITLE = 'Scheduling Agreement Confirmation'.

when 'G'.

TITLE = 'Contract Confirmation'.

when 'H'.

TITLE = 'Returns'.

when 'I'.

TITLE = 'Free-of-Charge Delivery'.

WHEN 'K'.

TITLE = 'Credit Memo Request'.

when 'L'.

TITLE = 'Debit Memo Request'.

when others.

TITLE = 'Order Confirmation.

Endcase.

you need to do like

CASE ZVBDKA-VBTYP.

WHEN 'A'.

TITLE = 'Inquiry'.

WHEN 'B'.

TITLE = 'Sales Quotation'.

WHEN 'C'.

TITLE = 'Sales Order'.

WHEN 'E'.

TITLE = 'Scheduling Agreement Confirmation'.

when 'G'.

TITLE = 'Contract Confirmation'.

when 'H'.

TITLE = 'Returns'.

when 'I'.

TITLE = 'Free-of-Charge Delivery'.

WHEN 'K'.

TITLE = 'Credit Memo Request'.

when 'L'.

TITLE = 'Debit Memo Request'.

when others.

TITLE = 'Order Confirmation'.

Endcase.

reward if helpful

Read only

Former Member
0 Likes
418

Hello,

You forgot the ' in the when others clause.

when others.

TITLE = 'Order Confirmation'.

endcase.

Regards,