cancel
Showing results for 
Search instead for 
Did you mean: 

Passing data of TextEdit to RFC

Former Member
0 Kudos

Hi,

Can anyone tell me how to pass data of TextEdit to RFC to update data in R/3. Please note that data in textEdit is of any length, in this case, how can i create an RFC variable of any length. Please let me know the possible solutions from front end as well as from R/3 side.

Thanks,

Srikanth.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You just need an attribute which is assingned to TextEdit UI. You should parse the RFC node and append data to this attribute.

String textLine = "";

for(int index=0;index<wdContext.nodeRFCData().size();index++)

{

wdContext.nodeRFCData().

textLine += wdContext.nodeRFCData().getRFCDataElementAt

(index).getattributename()+"\n";

}

wdContext.currentContextElement().setRFCText(textLine);

String textLine = wdContext.currentContextElement().getRFCText();

String[] lines = textLine.split("
n");

wdContext.nodeRFCData().invalidate();

for (int i = 0; i < lines.length; i++)

{

String string = lines<i>;

element = wdContext.nodeRFCData().createRFCDataElement();

element.Attributename(string);

wdContext.nodeRFCData().addElement(element);

}

Former Member
0 Kudos

Hi,

I personnaly split the attribute linked to the textarea into a table of 132 char. lines.

This is the same way abap stores long text (refer to save_text function module).

This way you can pass data to backend easily.

Regards,

Sylvain

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Thanks for your answers. Its helped me to some extent. But I have a strange problem, when i created a textEdit UI and defined cols as 72 and property wrapping = hard. Still on portal screen this UI elements is allowing to type from than 72 chars. Can anyobe tell me how to limit at 72 chars per row while typing in textedit UI.

Thanks,

Srikanth.

Former Member
0 Kudos

We can't restrict the number of characters a UI element can take. Rows and columns properties are to specify the visible no of rows and columns.

If u want a restriction in the number of characters you have to create a simple type and set it to a context attribute and then map it to the text view.

chk dis thread

Former Member
0 Kudos

Hi Kanwalpreet,

I don't have restriction in no. of chars in TextEdit. My req. is i want to put only 72 chars per each row of textEdit. End user should not be able to insert more than 72 per row. can you guide me how to achieve this?

Thanks,

Srikanth.

Former Member
0 Kudos

create simple data type.there you can set the maximum and minimum length for your data type and bind it to the text edit.

Former Member
0 Kudos

If a create a simple type with max 72 and assign it to textEdit element, does the attribute can save 20 rows of 72chars i.e 20 *72 = 1440 chars?

Former Member
0 Kudos

yes u can set d no of rows to 20 in the properties..n then u ll hv 20 *72 = 1440 chars