cancel
Showing results for 
Search instead for 
Did you mean: 

Restricting line items from printing in Smartform

Former Member
0 Kudos

Hi All,

I am new to smartforms. I am using a copy of standard form CRM_ORDER_CONFIRMATION_01 for quotation form printing in CRM. I need to restrict line items with status 'Rejected' from printing in the Quotation form. Since there is no driver program and only the class CL_DOC_PROCESSING_CRM_ORDER is used for printing the Quotation form, where should I write the logic to restrict the line items from displaying?

Should I write in smartform only? If yes, then in which section of the smartform should I write?

Thanks in advance!

Sonali.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

It is possible to read table data from smartforms and can be done using Program Lines node (which is exactly similar to ABAP Editor).

you can try this way.....

1.Declare a global variable wvg_flag.

2.Then write the code to fetch the data in the program lines and if you want to display that line then make wvg_flag = 'X'.

Dont forget to mention wvg_flag in output parameters of the program lines.

3.Then go the node where you are printing.Then click on conditions tab and include wvg_flag = 'X'.

then this will be printeed only when wvg_flag = 'X'.

Thanks & Regards,

Vamsi.

Former Member
0 Kudos

Thanks Vamsi!

I have applied the logic and my problem is solved.

Awarded points.

Sonali.

Former Member
0 Kudos

For line items window...u need to create a ALTERNATIVE node.

There u can give a condition for true (STATUS <> 'Rejected') , then only display line items.

And false condition (STATUS = 'Rejected'), then do not display the line items.

Former Member
0 Kudos

Thank you all for your responses!

Rajesh,

The status field is not in the line items table. I need to get the status from a different table based on line item number.So, is it possible to read the different table field in "ALTERNATIVE" node that you asked me to create?

Could you please give me some more details of where to put the code to access the different table table based on line item number and restrict the line items from displaying.

Thanks in advance!

Sonali.

former_member196079
Active Contributor
0 Kudos

Hi.

In node properties you find all for restrict and extend the window....

regards Marco

Himayatullah
Active Participant
0 Kudos

HI,

create a node for program lines in smartforms and write ur logic there. In CRM , if smartform concept is then we need to check for it.