cancel
Showing results for 
Search instead for 
Did you mean: 

Hidden fields in ALC and printing

Former Member
0 Kudos

Hi experts,

The form I created uses JavaScript to hide some fields which are wrapped in subforms. For example if a field is empty, the JS sets its presence to

"hidden" which means that the element will be completly excluded from the layout.

Since those elements are wrapped into subforms set to "flowed", once elements are hidden every elements beneath the hidden one go up, in order to fill the empty space.

This works fine when processing the form within SAP and having a preview.


The problem is when processing them in background to be printed on paper: the fields disappear (so we can say that JavaScript is working) but the elements beneath the hidden ones do not go up and the empty space is not filled.

Does anyone already encountered this problem and/or has a solution ?

Thanks !

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Paul,

Set your SFPDOCPARAMS structure FILLABLE = 'X' before call the form.

http://help.sap.com/saphelp_nw2004s/helpdata/en/44/a36a5cdee42aabe10000000a1553f7/content.htm

Hope this helps

regards,

Xiang Li

rakesh_m2
Contributor
0 Kudos

Hi Xiang,

I guess, fillable just makes the form as 'Interactive' right?  Will there be any effect on scripts we have written?  Please let me know.

Thanks,

Rakesh

Former Member
0 Kudos

In The Form Designer,

you have the events as prePrint  and postPrint.

make the fields visible in the event prePrint and they will be printed on print out.

Thanks.

Uma

rakesh_m2
Contributor
0 Kudos

Hi Paul,

Check if the subform you are using have 'min = 1' checked.  Try unchecking it.  If it does not work. 

You could fix this problem using little work around.  Instead of using javascript for hidden, try this method.

1. Create a dummy table.

2. If you have value in a field.  Add an initial line to a table and bind that table to the sub-form you are using and in binding tab, set max rows to 1 and remove min check box. 

You may need to create dummy tables as many sub-forms you are trying to make invisible.  

--

Rakesh