cancel
Showing results for 
Search instead for 
Did you mean: 

OPEN DATASET in ABAP MAPPING

0 Kudos

Hi Gurus

I'm trying to use the statement OPEN DATASET into a ABAP MAPPING but when I test in ID I get this error:

<Trace level="1" type="T">Error in mapping program ZCL_FI_CFD_MEX (type SAP-ABAP, kernel error ID UNCAUGHT_EXCEPTION) </Trace>

Also I've a ABAP program to test MAPPING and in debbuging time OPEN DATASET is everything OK.

Can I use any ABAP statement in ABAP MAPPING?

Thanks in advance.

Carlos

Accepted Solutions (1)

Accepted Solutions (1)

martin_dejl2
Participant
0 Kudos

Hi Carlos,

try ST22 if you can see any dump from mapping there. Try also SXI_MAPPING_TEST (more here /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping)

Martin

0 Kudos

Hi Martin, thanks for your replay.

I check ST22 and not dump's.

When I debbug the Method in ABAP program ([ABAP MAPPING TEST|/people/michal.krawczyk2/blog/2007/12/06/xipi-easy-abap-mapping-tests--no-more-sximappingtest ] ) all sentences is ok, but when I test my scenario I get an exception in ABAP Mapping, I put in commentary the sentences OPEN DATASET, test scenario and all is ok.

Then my doubt is "some ABAP sentences is not supported in ABAP MAPPING?".

Thanks again.

martin_dejl2
Participant
0 Kudos

Hi Carlos,

I don't think that some commands are "technically prohibited" in ABAP mapping. However I have one more tip for you. The mapping when running started from Java stack is running under different user then when you are trying to debug the mapping.

It's possible that system user (PIAPPLUSER most probably) has no sufficient permissions/roles and so it's failing. Check this

http://help.sap.com/saphelp_40b/helpdata/en/34/55cad198482bc0e10000009b38f91f/content.htm

"The system automatically performs an authorization check. If the user does not have the appropriate authorization, a runtime error occurs. You can check the existence of the authorization with the function module AUTHORITY_CHECK_DATASET."

Martin

0 Kudos

Hi Martin, thanks for your help.

I used FM AUTHORITY_CHECK_DATASET and just like you said the user don't have permits.

Now I need found profile I have to assign to the user.

Vadim.

Thank you too, this class exception are very usefull for me.

Answers (1)

Answers (1)

vadimklimov
Active Contributor
0 Kudos

Hello Carlos,

Please check exception handling implementation in your ABAP mapping - precisely speaking, handling of exceptions for OPEN DATASET. From error message you receive, it is seen that the exception is raised in OPEN DATASET and this exception is not handled. List of exceptions that can occur when calling OPEN DATASET is given below (taken from ABAP documentation):

CX_SY_FILE_OPEN / DATASET_REOPEN

CX_SY_CODEPAGE_CONVERTER_INIT / CONVT_CODEPAGE_INIT

CX_SY_CONVERSION_CODEPAGE / CONVT_CODEPAGE

CX_SY_FILE_AUTHORITY /OPEN_DATASET_NO_AUTHORITY, OPEN_PIPE_NO_AUTHORITY

CX_SY_PIPES_NOT_SUPPORTED

CX_SY_TOO_MANY_FILES / DATASET_TOO_MANY_FILES

Non-catchable exception / DATASET_PIPE_POSITION

Please let me know what exactly exception occurs so that more accurate analysis of the issue could be provided to you.

Please also provide source code extract of the affected mapping program (the part where OPEN DATASET is called) if possible.

Regards,

Vadim