‎2011 Jan 03 4:25 AM
Hi,
I have text which is created on SO10. I have declaration part on this element.
LOOP AT lt_tline INTO ls_tline.
....
ELSEIF ls_tline-tdline CS text-009. "text-009 contains 'Declaration'
PERFORM f_offset_text USING ls_tline-tdline
CHANGING gs_declaration-declaration.
This means after user write 'Declaration', he can write anything and this can contain more than one row so
BASICALLY PROBLEM BEGINS HERE...
because if user write two rows, I need structure that contains two fields and if user write three rows, I need structure structure that contains three fields.
I NEED STRUCTURE TO SEND EASILY TO SMARTFORM
‎2011 Jan 03 4:55 AM
‎2011 Jan 03 5:29 AM
>
> I have text which is created on SO10. I have declaration part on this element.
>
> LOOP AT lt_tline INTO ls_tline.
> ....
> ELSEIF ls_tline-tdline CS text-009. "text-009 contains 'Declaration'
> PERFORM f_offset_text USING ls_tline-tdline
> CHANGING gs_declaration-declaration.
>
> This means after user write 'Declaration', he can write anything and this can contain more than one row so
>
> I NEED STRUCTURE TO SEND EASILY TO SMARTFORM
I'm not sure what exactly you're trying to do here. Anyway if you want to pass the SO10 text to the smartform, you can use the "Include Text" type instead of coding for it.
BR,
Suhas
PS: You can specify dynamic texts as well !
‎2011 Jan 03 6:15 AM
‎2011 Jan 03 6:37 AM
Similar to ur requirement i also had a requirement where user can edit the standard text in the provided edior screen in the selection screen and that text has to be passed to the form.
i used...
to display the standard text in the screen
CALL METHOD G_CUSTOM->SET_TEXT_AS_R3TABLE
EXPORTING
TABLE = TEXTLINES
EXCEPTIONS
OTHERS = 1.
Once the user modified to get the details
CALL METHOD G_CUSTOM->GET_TEXT_AS_R3TABLE
IMPORTING
TABLE = TEXTLINES
EXCEPTIONS
OTHERS = 1.
and just save it in the dummy text. eg concatenate the SO10 text name_dummy. to create the dummy text following code.
LOOP AT TEXTLINES INTO W_TEXT.
W_LINE-TDFORMAT = '*'.
W_LINE-TDLINE = W_TEXT.
APPEND W_LINE TO T_LINE.
CLEAR W_LINE.
ENDLOOP.
CALL FUNCTION 'CREATE_TEXT'
EXPORTING
FID = G_TDID
FLANGUAGE = G_SPRAS
FNAME = G_TDNAME
FOBJECT = G_TDOBJ
TABLES
FLINES = T_LINE
EXCEPTIONS
NO_INIT = 1
NO_SAVE = 2
OTHERS = 3 .
pass this dummy text name to the smart form and once the smart form exceuted successfully just delete the dummy text
CALL FUNCTION 'DELETE_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = G_TDID
LANGUAGE = G_SPRAS
NAME = G_TDNAME
OBJECT = G_TDOBJ
SAVEMODE_DIRECT = ' '
TEXTMEMORY_ONLY = ' '
LOCAL_CAT = ' '
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2 .
Hope it will give some idea
regards,
Mullai