最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

abap - How do I set a value dynamically in SAP Adobe Forms using JavaScript - Stack Overflow

programmeradmin2浏览0评论

I'm creating a form based 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.TableOpenItem.REBZG.rawValue = 
     data.CustomerStatement.ItemTable.TableOpenItem.BELNR.rawValue; }

BELNR is a hidden field in TableOpenItem

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 in the SAP context. I have tried both "Alert" and print to console, but neither has any effect.

I'm creating a form based 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.TableOpenItem.REBZG.rawValue = 
     data.CustomerStatement.ItemTable.TableOpenItem.BELNR.rawValue; }

BELNR is a hidden field in TableOpenItem

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 in the SAP context. I have tried both "Alert" and print to console, but neither has any effect.

Share edited Dec 26, 2020 at 16:41 Sandra Rossi 13.8k6 gold badges25 silver badges56 bronze badges asked Sep 20, 2011 at 1:38 EstiEsti 3,6878 gold badges37 silver badges60 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 1

To enable the JavaScript Debugger for LiveCycle Designer and execute code from the JavaScript Console, you must enable JavaScript and the JavaScript Debugger in Acrobat Professional. You need to enable the JavaScript Debugger to access the JavaScript Console because the console window is a ponent in the JavaScript Debugger interface.

You can enable the JavaScript Debugger in Adobe Reader if you have LiveCycle Reader Extensions installed. To enable the JavaScript Debugger in Adobe Reader, you need to get the debugger.js file and then edit the Microsoft Windows Registry. For more information about enabling the JavaScript Debugger in Adobe Reader, see Developing Acrobat Applications Using JavaScript at partners.adobe./public/developer/acrobat/devcenter.html (English only). (from Help in Adobe designer) I hope it helpful..) Anyway you can use "this.isNull" instead of data.CustomerStatement.ItemTable.TableOpenItem.REBZG.rawValue == null And event.. usually I use event form:ready for such cases.

发布评论

评论列表(0)

  1. 暂无评论