‎2008 May 06 2:38 PM
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.
‎2008 May 06 2:41 PM
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
‎2008 May 06 2:43 PM
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
‎2008 May 06 2:45 PM
Hello,
You forgot the ' in the when others clause.
when others.
TITLE = 'Order Confirmation'.
endcase.
Regards,