Skip to Content

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

field split

Hi Experts,

i have the field lenth 25. example kjsh89907 lfjii999k87hu48 i want to split the above value after tha space like

kjsh89907

fjii999k87hu48 and then i wnat store the value in another field.

can any one tell me pls.

Thanks & Best Regards,

Rakhi.

replied

try this FM : HR_ES_SPLIT_STRING_TO_4_CHAR50

e.g.

pass your string to string variable.

declare as:

string type string, "Local variable to store ARKTX(Short text for sales order item)

string1 type SY-MSGV1, "Message Variable

string2 type SY-MSGV1, "Message Variable

string3 type SY-MSGV1, "Message Variable

string4 type SY-MSGV1, "Message Variable

CALL FUNCTION 'HR_ES_SPLIT_STRING_TO_4_CHAR50'

EXPORTING

IN_STRING = WA_out-string

STR_LEN = 27

IMPORTING

CHAR1 = WA_out-string1

CHAR2 = WA_out-string2

CHAR3 = WA_out-string3

CHAR4 = WA_out-string4.

you van vary the STR_LEN value according to your needs.

Sid

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question