2014 Aug 11 9:07 AM
Hi guys,
I'm getting error: "LS_EDIDD-SDATA and LS_STRUCTURE are not mutually convertible in Unicode Program"
I have PRKST which is Amount field in LS_STRUCTURE, which causes this problem.
But if I change type of PRKST to CHAR15, then it doesn't give error.
But i want to use this field with type PRKST( CURR 11, decimal places 2).
Please help. Its urgent.
Thanks,
Mehul Lad
Moderator message - "Urgency" is not allowed in the forums. Read the RoE.
Message was edited by: Suhas Saha
Hi guys,
I'm getting error: "LS_EDIDD-SDATA and LS_STRUCTURE are not mutually convertible in Unicode Program"
I have PRKST which is Amount field in LS_STRUCTURE, which causes this problem.
But if I change type of PRKST to CHAR15, then it doesn't give error.
But i want to use this field with type PRKST( CURR 11, decimal places 2).
Please help. Its urgent.
Thanks,
Mehul Lad
Moderator message - "Urgency" is not allowed in the forums. Read the RoE.
Message was edited by: Suhas Saha
2014 Aug 11 9:33 AM
Hi,
Please declare LS_STRUCTURE same as of type LS_EDIDD-SDATA.
I am assuming LS_EDIDD-SDATA is a structure, so it should be having a line type, suppose XYZ.
So, declare LS_STRUCTURE of type XYZ.
Regards,
Ashish
2014 Aug 11 10:00 AM
Thanks for reply.
Btw i can not declare LS_STRUCTURE same as LS_EDIDD-sdata.
becuase it is used to fill IDOC, its standard. it accepts any structure.
SDATA has data element EDI_SDATA which is LCHR 1000
2014 Aug 11 11:48 AM
Hi,
LCHR field is not a standalone field. It is always preceded by a field of type INT2 which has the length of the data stored in LCHR field.
So, in structure LS_EDIDD there should be a INT2 type field just before the field SDATA which tells the length of the actual value in SDATA. Suppose the field name is LEN.
So,
assign the value like this :
LS_STRUCTURE = LS_EDIDD-SDATA(LS_EDIDD-LEN).
Regards,
Ashish
2014 Aug 11 10:44 AM
Try this:
FIELD-SYMBOLS:
<ls_structure> LIKE ls_structure. " put TYPE SOME_TYPE for better performance
ASSIGN ls_edidd-sdata to <ls_structure>.
IF sy-subrc = 0.
ls_structure = <ls_structure>
ENDIF.
I did not test this in the editor so there might be some syntax errors.
regards
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |