Application Development 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: 

Size limitation of ITCSY structureu2019s VALUE field

pkb
Participant
0 Kudos

I have to send value to my Executable program from my SAP Script Using PERFORM statement and my Executable program will return value to SAPSCRIPT on the basis of sending value from SAP Scriptu2019s PERFORM statement. I have used ITCSY structure in my Executable program. But my problem is that I need to receive a value which size is more than 255 characters, where as ITCSY structure's VALUE field size is only 255. I am sending herwith my SAP SCRIPT Code and Executable Program code.

SAP SCRIPT:

/: PERFORM GET_ATTNDEE_INFO IN PROGRAM ZHR_TRNG

/: USING &PPVAR-EOBJD&

/: CHANGING &ATTND&

/: ENDPERFORM

Executable Prog.:

REPORT ZHR_TRNG.

FORM GET_ATTNDEE_INFO TABLES IN_PAR STRUCTURE ITCSY

OUT_PAR STRUCTURE ITCSY.

DATA : LOC_CODE(8),

WF_NAME LIKE PA0001-ENAME, "----Location Code

WF_SOBID LIKE HRP1001-SOBID. "----Business Event Code

DATA: BEGIN OF ITAB_ECODE OCCURS 0,

ECODE(8),

END OF ITAB_ECODE.

DATA: NAME1 TYPE STRING.

READ TABLE IN_PAR INDEX 1.

LOC_CODE = IN_PAR-VALUE.

SELECT SOBID FROM HRP1001 INTO WF_SOBID

WHERE OBJID = LOC_CODE AND OTYPE ='E' AND PLVAR = '01' AND SCLAS = 'P'.

APPEND WF_SOBID TO ITAB_ECODE .

ENDSELECT.

IF SY-SUBRC = 0.

LOOP AT ITAB_ECODE.

SELECT SINGLE ENAME FROM PA0001 INTO WF_NAME

WHERE PERNR = ITAB_ECODE-ECODE ." AND ENDDA >= '31.12.9999' .

CONCATENATE 'Mr ' WF_NAME ',' NAME1 INTO NAME1.

IF SY-SUBRC = 0 .

OUT_PAR-NAME = 'ATTND'.

OUT_PAR-VALUE = NAME1.

APPEND OUT_PAR.

ENDIF.

ENDLOOP.

ENDIF.

ENDFORM. "GET_USR_INFO

Here in OUT_PAR-VALUE, I have to store a character type value of size more than 255 characters through loop and at last it will return the value to SAPSCRIPT. My problem is that since the u2018VALUEu2019 field size of ITCSY is 255 characters only , I am not able to send back a value to SAPSCRIPT which size is more than 255 characters. Instead of using ITCSY, is there any other way to send back a value of size more than 255 characters to SAPSCRIPT from executable program?

Also I want to inform that my Print Prog. is a SAP Standard one , that is not editable.

Please help me

2 REPLIES 2

Former Member
0 Kudos

Hi,

Try using type String and create a new structure like ITCSY. Iam not sure that it will work for you but give it a try and revert back.

It should something like;

Types : BEGIN OF xyz,
  Name(10) type c,
  Value type String,
  END OF xyz.

DAta : it_xyz TYPE TABLE OF xyz,
       wa_xyz TYPE xyz.

wa_xyz-name = 'TEST'.
Do 26 times.
  concatenate wa_xyz-value '1234567890' INTO wa_xyz-value.
ENDDO.
APPEND wa_xyz to it_xyz.

The above demonstrates the field value with unlimited characters(i populated 260 characters).

Regards

Karthik D

Former Member
0 Kudos

Hi,

Why don't you valur to be returned into two variables v1 & v2. Store first 255 chars into v1 and rest in v2.

in Script Print them one by one...without any space....

I am never tried this...but just trying to give you a way out.....

No sure whether this will work or not......