Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

HR Related

Hii All,

I am facing a problem while entering the employee Basic Pay data in PA30. When I enter the data completely, and press ENTER, a runtime error is getting displayed, whereas if I press "SAVE", I am able to save my entries. Can anyone tell me what the problem is all about and how to rectify it? My requirement is that when I enter all the details of basic pay, and press "ENTER" button, I should be prompted with an Information message like "Save your entries", and when I save, the details should get saved.

The following is the display of runtime error..

Runtime Errors WRITE_TO_OFFSET_TOOLARGE

Date and Time 27.04.2006 11:59:12

ShrtText

Program error: Offset in WRITE TO in program "SAPFP500" is too large.

-


-


What happened?

Error in ABAP application program.

The current ABAP program "SAPFP500" had to be terminated because one of the

statements could not be executed.

This is probably due to an error in the ABAP program.

-


-


Error analysis

In a "WRITE src TO dest+off[(len)] [INDEX i]" statement,

"off" contains a target field offset (3) which is larger than

the length of the target field "dest" (4).

This is not allowed.

-


-


Trigger Location of Runtime Error

Program SAPFP500

Include FP500EFW

Row 33

Module type (FORM)

Module Name GET_FIRST_WORD

-


-


Source Code Extract

-


Line

SourceCde

-


3

----


4

  • Liest erstes Wort in einem Satz. *

5

----


6

  • --> GFW_SENTENCE: Satz, aus dem das Wort geholt wird. *

7

  • GFW_SEPARATOR_GROUP: *

8

  • Gruppe von moeglichen Endezeichen *

9

  • <-- GFW_WORD: Erstes Wort im Satz *

10

  • GFW_SEPARATOR: Seperator, d.h. Endezeichen des Wortes *

11

  • GFW_LENGTH: Laenge des Wortes, muss gepackt sein. *

12

  • GFW_SENTENCE: Satz ohne erstes Wort und Seperator. *

13

----


14

FORM GET_FIRST_WORD USING GFW_SENTENCE GFW_SEPARATOR_GROUP

15

GFW_WORD GFW_SEPARATOR GFW_LENGTH.

16

DATA: FIRST_CHARACTER(1).

17

DATA: CHARACTER_IN_WORD(1).

18

DATA: CHARACTER_POSITION LIKE SY-INDEX.

19

  • FIELD-SYMBOLS: <CHARACTER_IN_WORD>.

20

21

MOVE SPACE TO GFW_WORD.

22

CLEAR GFW_LENGTH.

23

  • ASSIGN GFW_WORD TO <CHARACTER_IN_WORD>.

24

  • ASSIGN <CHARACTER_IN_WORD>(1) TO <CHARACTER_IN_WORD>.

25

DO.

26

MOVE GFW_SENTENCE TO FIRST_CHARACTER.

27

IF GFW_SENTENCE EQ SPACE OR FIRST_CHARACTER CA GFW_SEPARATOR_GROUP.

28

MOVE FIRST_CHARACTER TO GFW_SEPARATOR.

29

EXIT.

30

ELSE.

31

  • MOVE GFW_SENTENCE TO <CHARACTER_IN_WORD>.

32

CHARACTER_POSITION = SY-INDEX - 1.

>>>>>

WRITE GFW_SENTENCE TO GFW_WORD+CHARACTER_POSITION(1).

34

SHIFT GFW_SENTENCE LEFT BY 1 PLACES.

35

ADD 1 TO GFW_LENGTH.

36

  • ASSIGN <CHARACTER_IN_WORD>+1(1) TO <CHARACTER_IN_WORD>.

37

ENDIF.

38

ENDDO.

39

SHIFT GFW_SENTENCE LEFT BY 1 PLACES. " Separator wegnehmen.

40

ENDFORM.

41

-


Urgent help required pls..

Thanks all,

Latheef

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question