on 09-20-2011 2:20 AM
I'm creating a form on the SAP standard Adobe form F140_CUS_STAT_01.
In the "Document" column I have the requirement to display field REBZG if it contains a value, or BELNR if not.
I have done the following:
if ( data.CustomerStatement.ItemTable.TableOpenItem.REBZG.rawValue == null )
{ data.CustomerStatement.ItemTable.TableOpenItem.REBZG.rawValue =
data.CustomerStatement.ItemTable.TableClearingItems.BELNR.rawValue; }
Unfortunately nothing happens. Is there something wrong with my syntax?; Should I be using a specific event? Do I have to treat the internal table fields differently?
Also, how do I debug javascript. I have tried both "Alert" and print to console, but neither has any effect.
Check if it is possible to pass from backend in the same way, i.e. if rebe2 is not there fill it with belnr.
Thanks,
Aravind
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello EstiNZ,
For comparing null values comapre with null and "" like
if(this.rawValue == null || this.rawValue == "")
also try this.isNull == "True";
Check in which event you have placed it.
If that doensn't work, try this.
var fields = xfa.layout.pageContent(xfa.layout.page(this)-1, "field", 0);
var text;
for (var i=0; i <= fields.length-1; i++)
{
if (fields.item(i).name == "REBZG")
{
text = fields.item(i).rawValue;
}
if (fields.item(i).name == "BELNR")
{
if(text == null || text == "")
{
fields.item(i).rawValue = text;
}
}
}
Thanks,
Rakesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.