cancel
Showing results for 
Search instead for 
Did you mean: 

Need to print Net Weight and Unit adjacently for internal table contents

former_member182465
Active Participant
0 Kudos

Hi Guys,

Need to print Net Weight and Unit adjace ntly for internal table contents. Which option is better either using concatenation by javascript or formcalc or by using filling the internal table with concatenation into a new char field in interface. Is theie any other way possible than this....

Accepted Solutions (1)

Accepted Solutions (1)

former_member182465
Active Participant
0 Kudos

It got solved.

Thanks pavan for your help.

The issue is that in formcalc after typing "." I need to select values from dropdown but I had directly typed that's why the formcalc code was not working.I am working in adobeforms after 4 years so forgot this important point.

Answers (1)

Answers (1)

pavan_prabhu
Active Participant
0 Kudos

Hello Abilash,

     Try to reduce usage of Scripting (Javascript or Formcalc) as much as possible since it will reduce the performance. Instead use the 2nd option i.e Filling the internal table with concatenation into a new char field using ABAP at Interface level so that It will increase the performance.

former_member182465
Active Participant
0 Kudos

Thanks Pavan for reply.

If i want to use formcalc or javascript how to write the code as its in internal table...

pavan_prabhu
Active Participant
0 Kudos

Hello Abilash,


     If you want to use Javascript to add(concatenate) two or more string variables together, you can use the "+" operator. Also note that the array techniques can also be used as a replacement of plus operator.


For example if you want to show net weight and unit (which are in individual columns) adjacently in a single column, write the below Javascript in Initialize event on the column where u want to show concatenated value.


this.rawvalue = this.parent.weight.rawvalue + this.parent.unit.rawvalue;


The column will be basically inside the DATA sub form of the table in the hierarchy tab.


This will compute the value for each record in the Internal table because the code is directly written on the column at the design level.

former_member182465
Active Participant
0 Kudos

Hi Pavan,

I tried with Formcalc using concatenate in form:ready event and also with javascript as you mentioned in Initialize event.

But didnt got success.

What i am doing is in data tab of internal table i had created a subform in separate line with 3 fields weight value, unit and text field. Both weight value and unit are binded to internal table fields. text field is not binded.

How to use formcalc event for this scenario.

Please share your thoughts.