Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Custom Container Suggestion

Former Member
0 Likes
1,750

Dear All,

Can any one give some suggestion to overcome my issue

Issue is i have created a Custom Container and some push buttons in my screen

i wrote a logic like if i press a push button the text will appear in my Custom container up to this extent that is working fine

and if i press another push button the text will appear in the custom container but the below line of previous text

i need right side of the previous text how to solve this

Please give suggestions

Thanks

Surendra P

1 ACCEPTED SOLUTION
Read only

former_member217544
Active Contributor
0 Likes
1,718

Hi Surendra,

Can you explain what do you mean by

i need right side of the previous text how to solve this

Does that mean- You want as continuous text to the previous entered text?

May be you can use 'CONCATENATE' statement to make it continuous.

If my understanding is not correct, can you explain a bit more along with your code?

Regards,

Swarna Munukoti.

Edited by: Swarna Munukoti on Dec 30, 2009 12:59 PM

Dear All,

Can any one give some suggestion to overcome my issue

Issue is i have created a Custom Container and some push buttons in my screen

i wrote a logic like if i press a push button the text will appear in my Custom container up to this extent that is working fine

and if i press another push button the text will appear in the custom container but the below line of previous text

i need right side of the previous text how to solve this

Please give suggestions

Thanks

Surendra P

13 REPLIES 13
Read only

former_member217544
Active Contributor
0 Likes
1,719

Hi Surendra,

Can you explain what do you mean by

i need right side of the previous text how to solve this

Does that mean- You want as continuous text to the previous entered text?

May be you can use 'CONCATENATE' statement to make it continuous.

If my understanding is not correct, can you explain a bit more along with your code?

Regards,

Swarna Munukoti.

Edited by: Swarna Munukoti on Dec 30, 2009 12:59 PM

Read only

0 Likes
1,718

Hi Swarna,

Thanks for ur responce

ya u r correct i need continious text

if i have 2 push buttons i use concatinate but if i have more than or equal to 10 push buttons at that time what to do

and is there any sap defined solution for continious text in custom container

Thanks

Surendra Reddy P

Read only

0 Likes
1,718

Browser problem so that it posts 5 times

sorry for that

Thanks

Surendra Reddy P

Edited by: Suri551 on Dec 30, 2009 2:10 PM

Read only

0 Likes
1,718

Browser problem so that it posts 5 times

sorry for that

Thanks

Surendra Reddy P

Edited by: Suri551 on Dec 30, 2009 2:11 PM

Read only

0 Likes
1,718

Browser problem so that it posts 5 times

sorry for that

Thanks

Surendra Reddy P

Edited by: Suri551 on Dec 30, 2009 2:10 PM

Read only

0 Likes
1,718

Hi Suri,

and if i press another push button the text will appear in the custom container but the below line of previous text 

Can you post the code written for this on how the text is coming below the previous text. May be we can suggest if we can go with any modifications there.

Regards,

Swarna Munukoti

Read only

0 Likes
1,718

Hi Swarna

Thanks for ur responce

i have a table control in that some data is there if i select one column and press a push button it is appear in custom control

and if i select another column in the same table control and press a push button the text is appear in the below of the previous text

i need continous text

and my code is here can u suggest please

WHEN 'BT_PRO'.
      IF NOT IT_TBCL[] IS INITIAL.
*if pocess button is pressed for the first time then asssign the table field  to left  input box.
        CLEAR : IT_TBCL.
        READ TABLE IT_TBCL WITH KEY PIC = 'X'.
        IF SY-SUBRC = 0.
          IF V_FLG = 'X'.
            V_FLD = IT_TBCL-FLD_NAME.
            IN_LFT = V_FLD.
            CLEAR V_FLD.
            V_FLG = ''.
          ELSE.
            V_FLD = IT_TBCL-FLD_NAME.

            CALL METHOD EDITOR->GET_TEXT_AS_STREAM
              IMPORTING
                TEXT = TEXT_TAB.

            CONCATENATE V_GETF V_FLD INTO V_GETF.
            APPEND V_GETF TO TEXT_TAB.
            CLEAR  V_FLD.

            CALL METHOD EDITOR->SET_TEXT_AS_STREAM
              EXPORTING
                TEXT = TEXT_TAB.


          ENDIF.

Edited by: Suri551 on Dec 31, 2009 5:39 AM

Read only

0 Likes
1,718

Hi Suri,

Can you provide how TEXT_TAB has been declared in your code?


DATA: V_STRING of type STRING.

CALL METHOD EDITOR->GET_TEXT_AS_STREAM
              IMPORTING
                TEXT = TEXT_TAB.
 
LOOP AT TEXT_TAB. " inlcude this loop statement.
CONCATENATE V_STRING TEXT_TAB-<fieldname> INTO V_STRING SETARATED BY SPACE.
ENDLOOP.
REFRESH TEXT_TAB[ ].

            CONCATENATE V_STRING V_GETF V_FLD INTO V_GETF. " include v_string in the concatenate statement
            APPEND V_GETF TO TEXT_TAB.
            CLEAR  V_FLD.

Edited by: Swarna Munukoti on Dec 31, 2009 6:24 AM

Edited by: Swarna Munukoti on Dec 31, 2009 6:24 AM

Read only

0 Likes
1,718

Hi Swarna,

Like the below i declare .

DATA: LINE(256) TYPE C,
      TEXT_TAB LIKE STANDARD TABLE OF LINE,
      FIELD LIKE LINE.

Read only

0 Likes
1,718

Hi Suri,

Ok, means it can accept only 256 characters per line.

Can you check if it allows you to define the table in this way:

DATA: TEXT_TAB LIKE STANDARD TABLE OF STRING.

so that you can implement the above code to look like a continuous string?

Regards,

Swarna Munukoti

Read only

0 Likes
1,718

Hi Swarna,

It is Not working

if i declare with table of String

when execute it goes to shortdump

Thanks

Surendra P

Read only

0 Likes
1,718

Hi Surendra,

Then try increasing the length of 'LINE'

DATA: LINE(65000) TYPE C,

TEXT_TAB LIKE STANDARD TABLE OF LINE,

FIELD LIKE LINE.

and use this code:


LOOP AT TEXT_TAB INTO field. " inlcude this loop statement.
CONCATENATE V_STRING field INTO V_STRING SEPARATED BY SPACE.
ENDLOOP.
REFRESH TEXT_TAB[ ].
CLEAR FIELD.
 
            CONCATENATE V_STRING V_GETF V_FLD INTO FIELD. " include v_string in the concatenate statement
            APPEND FIELD TO TEXT_TAB.
            CLEAR  V_FLD.

Regards,

Swarna Munukoti.

Read only

0 Likes
1,718

Hi Swarna,

Thank u very much issue was resolved with ur help

Again thank u very much.

Regards

Surendra Reddy P