cancel
Showing results for 
Search instead for 
Did you mean: 

Custom VC application Data issue with SPACE

ADIDAS
Participant
0 Kudos

Hi,

We are building a Custom VC application for an approval process. The Data for the record creation in ECC is entered in the UI screen. The Screen has a few fields of which one is a Text field. The Backend Module has this field declared as CHAR 60.

When we are entering some data in the text field that has SPACEs between the different texts the SPACEs get converetd to %20. Also the value is sved with %20 in the Table at the backend.

Is here any way in VC we can avoid this encoding/conversion that is taking place.

Regards,

Arunava

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Arunava,

We had the same problem and we were not able to handle this from VC side. This is not only the case for SPACE it's for all the special characters. We ended up handling all these things in BAPI itself.

Regards,

Murtuza

ADIDAS
Participant
0 Kudos

Hi Murtuza,

Thanks for your reply. We have the exact same issue and i saw ur question in the forum. We will perhaps need to follow your path for placing the code in the BAPI. Is there any standard FM u are using for encoding and decoding ?

Meanwhile I am also planning to create a SAP OSS Note just in case SAP takes iy up.

Regards,

Arunava

Former Member
0 Kudos

Hi Arunava,

This is the code that we placed in our BAPIs to handle the same

SPLIT wa_import-po_itemtxt AT '%20' INTO TABLE itab.

CLEAR wa_import-po_itemtxt.

CONCATENATE LINES OF itab INTO wa_import-po_itemtxt SEPARATED BY space.

REFRESH itab.

REPLACE ALL OCCURRENCES OF REGEX '%21' IN wa_import-po_itemtxt WITH '!'.

REPLACE ALL OCCURRENCES OF REGEX '%22' IN wa_import-po_itemtxt WITH '"'.

REPLACE ALL OCCURRENCES OF REGEX '%23' IN wa_import-po_itemtxt WITH '#'.

REPLACE ALL OCCURRENCES OF '%24' IN wa_import-po_itemtxt WITH '$'.

REPLACE ALL OCCURRENCES OF REGEX '%25' IN wa_import-po_itemtxt WITH '%'.

REPLACE ALL OCCURRENCES OF REGEX '%26' IN wa_import-po_itemtxt WITH '&'.

REPLACE ALL OCCURRENCES OF REGEX '%27' IN wa_import-po_itemtxt WITH ''''.

REPLACE ALL OCCURRENCES OF REGEX '%28' IN wa_import-po_itemtxt WITH '('.

REPLACE ALL OCCURRENCES OF REGEX '%29' IN wa_import-po_itemtxt WITH ')'.

REPLACE ALL OCCURRENCES OF REGEX '%2A' IN wa_import-po_itemtxt WITH '*'.

REPLACE ALL OCCURRENCES OF REGEX '%2B' IN wa_import-po_itemtxt WITH '+'.

REPLACE ALL OCCURRENCES OF REGEX '%2C' IN wa_import-po_itemtxt WITH ','.

REPLACE ALL OCCURRENCES OF REGEX '%2D' IN wa_import-po_itemtxt WITH '-'.

REPLACE ALL OCCURRENCES OF REGEX '%2E' IN wa_import-po_itemtxt WITH '.'.

REPLACE ALL OCCURRENCES OF REGEX '%2F' IN wa_import-po_itemtxt WITH '/'.

REPLACE ALL OCCURRENCES OF REGEX '%3A' IN wa_import-po_itemtxt WITH ':'.

REPLACE ALL OCCURRENCES OF REGEX '%3B' IN wa_import-po_itemtxt WITH ';'.

REPLACE ALL OCCURRENCES OF REGEX '%3C' IN wa_import-po_itemtxt WITH '<'.

REPLACE ALL OCCURRENCES OF REGEX '%3D' IN wa_import-po_itemtxt WITH '='.

REPLACE ALL OCCURRENCES OF REGEX '%3E' IN wa_import-po_itemtxt WITH '>'.

REPLACE ALL OCCURRENCES OF REGEX '%3F' IN wa_import-po_itemtxt WITH '?'.

REPLACE ALL OCCURRENCES OF REGEX '%40' IN wa_import-po_itemtxt WITH '@'.

REPLACE ALL OCCURRENCES OF REGEX '%5B' IN wa_import-po_itemtxt WITH '['.

REPLACE ALL OCCURRENCES OF REGEX '%5C' IN wa_import-po_itemtxt WITH '\'.

REPLACE ALL OCCURRENCES OF REGEX '%5D' IN wa_import-po_itemtxt WITH ']'.

REPLACE ALL OCCURRENCES OF REGEX '%5E' IN wa_import-po_itemtxt WITH '^'.

REPLACE ALL OCCURRENCES OF REGEX '%5F' IN wa_import-po_itemtxt WITH '_'.

REPLACE ALL OCCURRENCES OF REGEX '%60' IN wa_import-po_itemtxt WITH '`'.

REPLACE ALL OCCURRENCES OF REGEX '%7B' IN wa_import-po_itemtxt WITH '{'.

REPLACE ALL OCCURRENCES OF REGEX '%7C' IN wa_import-po_itemtxt WITH '|'.

REPLACE ALL OCCURRENCES OF REGEX '%7D' IN wa_import-po_itemtxt WITH '}'.

REPLACE ALL OCCURRENCES OF REGEX '%7E' IN wa_import-po_itemtxt WITH '~'.

Regards,

Murtuza

ADIDAS
Participant
0 Kudos

Thanks Murtuza,

I also found a OSS note - Note 1235408 - Known Issues - Visual Composer for SAP NetWeaver 7.0 SP16 which lists all the existing issues with VC 7.0 SP16. and this is one of the flow listed there. Says no Workaround at this point solution will be provided in SP 17

Text in input control is URL encoded

URL encoding is used on input controls which result in converting characters to the URL encoding standard, e.g. space is converted to %20.

Solution: Will be provided in SP 17.

Workaround: None.

Regards,

Arunava