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

ERROR IN CODE

Former Member
0 Likes
567

Hi all,

can anyone tell me the error.

if editor1 is initial.

CREATE OBJECT TEXTEDIT_CUSTOM_CONTAINER1

EXPORTING

CONTAINER_NAME = 'TEXTEDITOR2'

EXCEPTIONS

CNTL_ERROR = 1

CNTL_SYSTEM_ERROR = 2

CREATE_ERROR = 3

LIFETIME_ERROR = 4

LIFETIME_DYNPRO_DYNPRO_LINK = 5.

IF SY-SUBRC NE 0.

  • add your handling

ENDIF.

CREATE OBJECT EDITOR1

EXPORTING

PARENT = TEXTEDIT_CUSTOM_CONTAINER1

WORDWRAP_POSITION = '85'

WORDWRAP_MODE = CL_GUI_TEXTEDIT=>WORDWRAP_AT_FIXED_POSITION

WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=>FALSE

EXCEPTIONS

OTHERS = 1.

endif.

IF SY-SUBRC NE 0. -


********* HERE IS ERROR

CALL FUNCTION 'POPUP_TO_INFORM'

EXPORTING

TITEL = V_REPID_9911 "--> program name

TXT2 = SPACE

TXT1 = 'Error in flush'.

ENDIF.

When iam going to the screen for the first time

sy-subrc is 0 and its working fine.

when i am going back and coming again the sy-subrc is 4

and iam getting an error ERROR IN FLUSH.

I HAVE TO RECTIFY THIS.

QUESTION 1)

WHAT DOES THIS PIECE OF CODE DOES.

IF SY-SUBRC NE 0.

CALL FUNCTION 'POPUP_TO_INFORM'

EXPORTING

TITEL = V_REPID_9911 "--> program name

TXT2 = SPACE

TXT1 = 'Error in flush'.

ENDIF.

QUESTION2)

WHAT DOES THE SY-SUBRC HERE REFERRING TO .

WAITING FOR REPLIES.

THANKS

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
543

Hi,

1)

The function module give the message in a POPUP..

2)

The sy-subrc is set in some other place...THis is not because of the container or the editor..

Clear the SY-SUBRC before the IF condition if editor1 is initial.

..

CLEAR: SY-SUBRC.

if editor1 is initial.

...

Endif.

Thanks,

Naren

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
543

Can I see all of your code?

Regards,

Rich Heilman

Read only

0 Likes
543

QUESTION 1)

WHAT DOES THIS PIECE OF CODE DOES.

IF SY-SUBRC NE 0.

CALL FUNCTION 'POPUP_TO_INFORM'

EXPORTING

TITEL = V_REPID_9911 "--> program name

TXT2 = SPACE

TXT1 = 'Error in flush'.

ENDIF.

This piece of code obviously throws a popup message, that's it.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
544

Hi,

1)

The function module give the message in a POPUP..

2)

The sy-subrc is set in some other place...THis is not because of the container or the editor..

Clear the SY-SUBRC before the IF condition if editor1 is initial.

..

CLEAR: SY-SUBRC.

if editor1 is initial.

...

Endif.

Thanks,

Naren

Read only

0 Likes
543

hi Guys,

Its working.

Thanks for your replies.

Iam awarding points to all