cancel
Showing results for 
Search instead for 
Did you mean: 

Text Box in ITS Mobile

Former Member
0 Kudos

Hi Folks,

We are currently implementing a solution that uses ITS Mobile on Motorola Handhelds using the pocket browser. One of our screens requires a text box which I have implemented using a custom control and it renders correctly in the SAP GUI.

However, when we try to view this screen on the ITS Mobile we get the below error:

Unknown type CUST_CTRL for element TEXTEDITOR1

I have searched the forums and found the following links:

http://scn.sap.com/thread/1836604

https://scn.sap.com/thread/1962720

Which suggest the correct way to solve this issue is by using the ALV include that comes with the ITS Mobile

`include(~service="itsmobile", ~theme="99", ~name="alv_grid.html");

alv_grid("ALV", 52, 8);`

However, I am not trying to display an ALV Grid and I don't find a similar include for a text box. So therefore I decided to manipulate the HTML and put in a textarea myself manually using the following code:

                                    <textarea name="TEXTEDITOR1" cols="21" rows="5">

                                                       `strmaskext('GV_INSTRUCTIONS'[1], 1)`

                                    </textarea>

However, the text in GV_INSTRUCTIONS is not formatted correctly and has a max length of 132 characters and this is not suitable.

Does anyone know how I can meet my requirement?

Many Thanks,

Colm

Accepted Solutions (1)

Accepted Solutions (1)

former_member194364
Active Contributor

Hi Colm,

What Kernel and Basis are you using? What generation style are you using for your ITSMobile Service?

See the following SAP Note:

1446334  ITSmobile: new feature: multiline input field (textarea)

It may have what you require here?

Regards,

Oisin

Former Member
0 Kudos

Hi Oisin,

We're on version 702 so you're note does look like it could apply, I couldn't find this when I went looking so I had to modify the template myself with some HTML and JavaScript

                            <tr class="MobileRow">


                                <td colspan="33" rowspan="5">


                                          <textarea name="texteditor1" cols="33" rows="5">


                                          </textarea>


    <script>


       var instruct ="

`strmaskext('GV_PICK_INS_1'[1], 1)`";


       instruct +="\n

`strmaskext('GV_PICK_INS_2'[1], 1)`";


       instruct +="\n

`strmaskext('GV_PICK_INS_3'[1], 1)`";


       instruct +="\n

`strmaskext('GV_PICK_INS_4'[1], 1)`";


       instruct +="\n

`strmaskext('GV_PICK_INS_5'[1], 1)`";


       instruct +="\n

`strmaskext('GV_PICK_INS_6'[1], 1)`";


       instruct +="\n

`strmaskext('GV_PICK_INS_7'[1], 1)`";


       instruct +="\n

`strmaskext('GV_PICK_INS_8'[1], 1)`";


       instruct +="\n

`strmaskext('GV_PICK_INS_9'[1], 1)`";


       instruct +="\n

`strmaskext('GV_PICK_INS_9'[1], 1)`";


       instruct +="\n

`strmaskext('GV_PICK_INS_10'[1], 1)`";


       document.forms["mobileform"]["texteditor1"].value = instruct;


    </script>

The reason the we need to use the GV_PICK_INS_XX is that the actual text value is only available to the HTML if it's on the GUI screen, I would have used just one variable of type STRING but the GUI editor won't let you create a textbox of that length so I'm left with this solution. I'll have a further look into your note to see if I can use it to meet the requirement.

Thanks!

Colm

former_member194364
Active Contributor
0 Kudos

Hi Colm,

Are you using sytle MOBILE4? Check that ITSGENMOBILE4 was published in SE80 after SAP BASIS SABKB70204 was applied?

Does your last post - offer a workaround for the problem posted?

Regards,

Oisin

Former Member
0 Kudos

No, we are using a custom service which is a copy of ITSGENMOBILE with some small adjustments, I have ITSGENMOBILE4 available to use but the decision to use ITSGENMOBILE was done before I got involved.

So if I used ITSGENMOBILE4 you think this issue would be resolved? Does that mean we are 4 services behind the latest?

former_member194364
Active Contributor
0 Kudos

Hi Colm,

ITSGENMOBILE is used to generate the template style MOBILE for your service. It is not an "ITSMOBILE" service itself. I presume you know this - but just want to clarify in case other's are following this thread.

ITSGENMOBILE4 does not mean you are 4 services behind. I cannot answer why the "4" was added though?

Note 1446334 - ITSmobile: new
feature: multiline input field (textarea)

is only relevant if one has generated templates using STYLE 'Mobile4'

See also the WIKI:

Getting to know ITSmobile by Checking out the Internet Services

http://wiki.sdn.sap.com/wiki/x/FxMMDg

Regards,

Oisin

http://wiki.sdn.sap.com/wiki/x/FxMMDg

Former Member
0 Kudos

Ya so I see, no 2 or 3, just 4. Well that meets our requirement so 10 points for you good sir. Many thanks!

former_member194364
Active Contributor
0 Kudos

Hi Colm,

Some more information.

As noted already multiline text edit control is only supported by MOBILE4 generator

and if one's system contains the correction of the note  Note 1446334

Using it is very simple and requires NO manual modification of templates!

  1. First publish
    ITSMOBILE and ITSGENMOBILE4 services
    in SE80
  2. SE80 Screen Painter, go to Properties of a TextField which you want to make
    multiline:
  3. See below screenshot

  1. Save and activate the Screen.
  2. GENERATE the Template for the screen and PUBLISH it.
  3. Test!
  4. Below is the test case: ITSMOBILE03 - whose screen is modified
  5. Item 15) in below screenshot is a now a multiline text edit control

Regards,

Oisín

Answers (0)