cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Cloud SDK : Display more 500+ character in the PDF form in table cell

Former Member
0 Kudos

Hi Experts,

I have requirement in the PDF form.

Scenario:

My custom business object

businessobject DummyObject {

     element ID : ID;

     element FromDate : Date;

     element ToDate : Date;

     node AllActivity [0,n] {

               element ActivityID : ID

               element ActivityType : 

               element Note: Note;

     }

}

The above business object have node level data and i under this node level data Activity Id , Activity Type and Notes associated with that activity as show below.

so as per the above activity i have retrieve the data for the activity and store into my custom business object at node level ( Activity ID  , Activity Name , Activity Type and Notes ) that mentioned above screen.

I have created 1 form and design in adobe life cycle just Drag and Drop the element from the DataView.

After completed the print from i have create the preview button to display the data.

Once i have done all the steps to display the form and click click on preview button i can able to see the data but the under the Note field only display the 256 character not more than that but as per the above screen i have entered the Notes with more than 500+ character.

In the form design i have also change the property for Note field to Allow Multiple value and Rich Tech but data is not display with all the character.

Anyone have idea on which data type display the more than 500+ character in the form.

I am using "Note" data type.

Can anyone suggest me what the solution to display the proper value in the form.

Please let me because i am stuck in this issue.

Many Thank,

Mithun

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mithun,

As far as I know, field lengths in custom BOs are restricted in length (don't ask me why).

This restriction does not apply for SAP BOs, so the original activity is able to store longer content

Using the "Note" type in in a custom BO does not help circumvent this limitation.

I have two ideas to work around this limitation:

  1. Use an association to the original SAP BO and retrieve the content from there.
    This is not an option if your intention is to create a snapshot of an activity at a specific time, i.e. if the activity note might change at a later point in time but your intention is to store the current content of the activity note
  2. Use a TextCollection dependent object.
    These can store content of arbitrary length but are a bit cumbersome to handle if you only need a text string storage object.

Best regards,

Ludger

Former Member
0 Kudos

Hi Ludger,

I have never use the TextCollelction.

Can you please help me how to use the TextCollection on the node level?

What is the code to define the element with data type TextCoollection?

Do you have any code or any sample that uses the TextCollection at node?

Many Thanks,

Mithun

Former Member
0 Kudos

on the BO, add the following line:


[DependentObject(TextCollection)] node Note;

in some BO action, where the copying happens:


var noteFromActivity; // contains the note from the activity

this.Note.Create();

var el_note_text : elementsof this.Note.Text;

el_note_text.LanguageCode = LanguageCode.ParseFromString("EN");

el_note_text.TypeCode.content = "10006";

var text = this.Note.Create(el_note_text);

var content = text.TextContent.Create();

content.Text.content = noteFromActivity.content;

To display the content of the textcollection, use the following SAP embedded component:

/SAP_BYD_APPLICATION_UI/Reuse/Notes/singletextlangedit.EC.uicomponent

In the embedded component properties, set the TextTypeCode property to "10006".

Bind the embedded component using node reference binding to the BO containing the TextCollection

Bind the LanguageCode to a data field containing the language code for english.

Best regards,

Ludger

Former Member
0 Kudos

Hi Mithun, this can be the problem, did you try to enter more than 255 chars and to save the custom BO? If after the save you can still see all the chars so the problem is not on the BO definition otherwise you should use the solution provided by Ludger

Former Member
0 Kudos

Hi Ludger and Alessandro,

Thanks for you halpful reply.

I can successfully display the 1000+ characters in the table level line item and display in the PDF form as shown below using the TextCollection.

Test1 -: Display the 1000 Character in Third Column in below screen.

Test2 -: Display the 1698 Character in Third Column in below screen.

In Test1 We can see that i have display the 1000 characters in third column in each row and in Test2 i have display the 1500+ characters in 2nd Row third column.

Thanks to all and appreciate your help in to resolve this issue..

Many Thanks,

Mithun

Answers (0)