on 11-25-2010 7:58 AM
Hi,
i created a new form (TA SFP)... works well!
Now i had a new requirement:
i added a field to the form (MATNR) from my own structure.
If this field is not initial within the calling program, the field has to be shown on pdf.
if the field is initial - the field has to be invisible on the pdf.
is there a possibility to do this?
Thx for any answers.
Thomas
Edited by: Thomas Feldmann on Nov 25, 2010 8:59 AM
Remember to set the form as Interactive in stead of Static form.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
thx, but where and how?
Sorry but i have no java knowledge
XML-Code for this field:
<field name="MATNR" y="149.225mm" x="38.1mm" w="62mm" h="9mm">
<ui>
<textEdit>
<border>
<?templateDesigner StyleID aped3?>
<edge stroke="lowered">
</edge>
</border>
<margin/>
</textEdit>
</ui>
<font typeface="Arial"/>
<margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
<para vAlign="middle"/>
<caption reserve="25mm">
<font typeface="Arial"/>
<para vAlign="middle"/>
<value>
<text>Artikel</text>
</value>
</caption>
<value>
<text maxChars="18"/>
</value>
<bind match="dataRef" ref="IS_GRUNDDATEN.MATNR"/>
<desc>
<text name="Schema-Anmerkung">Artikelnummer</text>
</desc>
</field>
<?templateDesigner expand 1?>
is this the correct place?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The one you posted here is a xml script we dont edit xml script.
In SFP TCODE..
View the form in Design View.
Click on the Textfield you have.
Now go to pallets-->scripteditor from the menu bar.
a page is visible just above to your designview tab or right side of your editor.
in the 1st dropdown select formready
in the 2nd dropdown which is located right most corner of this script editor select java script.
and just copy paste my code there
Thats it.
If you want to test it locally before activating the form.
Select the field in object prioperties pane goto value tab put some value in the default. now select the preview pdf tab and viceversa.
Let me know if u need more help.
Regards,
Sai.
Hi Thomas,
Select the field go to script editor-->formReady event. (javascript)
have the below code
this.presence = (this.rawValue == null || this.rawValue == "") ? "hidden" : "visible";
Regards,
Sai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.