Application Development and Automation 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: 
Read only

code help small, selection option

former_member196080
Participant
0 Likes
1,257

Hi guys,

I'm trying to code some small ABAp code but getting some short dump pls take a look and let me knwo what wrong I'm doing.

Corrected code would be much apprciated.

Requiremnet.

My requiremnet is to create a report which takes week as a parameter either one or many and I want to assign that user entry to some function module which accespts only ranges.

I designed code no errors but while executing it is throwing short dump:

Code

Data: week_wa TYPE /bic/pzweek-/BIC/zWEEK.

selection-screen begin of block main with frame .

*Parameters: week TYPE week_tab-/BIC/WEEK.

SELECT-OPTIONS week for week_wa.

selection-screen end of block main.

AT SELECTION-SCREEN OUTPUT.

Entry for FISCALWEEK = SELECTION OPTIONS

CLEAR LT_TAB.

*WA_TAB-SIGN = 'I'.

*WA_TAB-OPTION = 'EQ'.

*WA_TAB-LOW = week-low.

*WA_TAB-KEYFL = 'X'.

WA_TAB-SIGN = week-sign.

WA_TAB-OPTION = week-option.

WA_TAB-LOW = week-low.

*WA_TAB-HIGH = week-HIGH.

WA_TAB-KEYFL = 'X'.

APPEND WA_TAB TO LT_TAB.

L_THX_SEL-IOBJNM = 'ZWEEK'.

L_THX_SEL-T_RANGE[] = LT_TAB[].

INSERT L_THX_SEL INTO TABLE LT_THX_SEL.

assigning LT_THK_SEL to FM.

Pls advise what worng I'm passing to this Function module

Thanks

R

1 ACCEPTED SOLUTION
Read only

Clemenss
Active Contributor
0 Likes
1,213

Hi Rubane,

check how to post as code (formatted)

INSERT L_THX_SEL INTO TABLE LT_THX_SEL.

assigning LT_THK_SEL to FM.

This code gives syntax error. How can we judge if you can't paste.

but getting some short dump What kind of?

Regards,

Clemens

9 REPLIES 9
Read only

Former Member
0 Likes
1,213

Are you getting dump at the time of calling the FM or within the FM? if it is at the time of calling, there could be something wrong with your input parameters...

Unless we know what kind of dump you are getting along with the code lines causing dump, it is difficult to find out...

Read only

0 Likes
1,213

It is at the time of calling FM ,exception is getting raised

Exception condition "X_MESSAGE" raised.

Read only

0 Likes
1,213

pls let me know I already given the code what could be wrong with Input parameters.

Read only

0 Likes
1,213

the remaining part of code is here with FM

CALL FUNCTION 'RSDRD_SEL_DELETION'

EXPORTING

I_DATATARGET = '0sd_C03'

I_THX_SEL = LT_THX_SEL

I_AUTHORITY_CHECK = 'X'

I_THRESHOLD = '1.0000E-01'

I_MODE = 'C'

I_NO_LOGGING = ''

I_PARALLEL_DEGREE = 1

I_NO_COMMIT = ''

I_WORK_ON_PARTITIONS = ''

I_REBUILD_BIA = ''

I_WRITE_APPLICATION_LOG = 'X'

CHANGING

C_T_MSG = L_T_MSG.

export l_t_msg to memory id sy-repid.

Edited by: Rubane S on Jan 25, 2011 3:59 PM

Read only

0 Likes
1,213

> CALL FUNCTION 'RSDRD_SEL_DELETION'
>   EXPORTING
>     I_DATATARGET            = '0sd_C03'
>     I_THX_SEL               = LT_THX_SEL
>     I_AUTHORITY_CHECK       = 'X'
>     I_THRESHOLD             = '1.0000E-01'
>     I_MODE                  = 'C'
>     I_NO_LOGGING            = ''
>     I_PARALLEL_DEGREE       = 1
>     I_NO_COMMIT             = ''
>     I_WORK_ON_PARTITIONS    = ''
>     I_REBUILD_BIA           = ''
>     I_WRITE_APPLICATION_LOG = 'X'
>   CHANGING
>     C_T_MSG                 = L_T_MSG
>   EXCEPTIONS
>        X_MESSAGE                     = 1
>       INHERITED_ERROR               = 2
>       INVALID_TYPE                  = 3
>       OTHERS                        = 4.      .

Catch your exceptions in FM and check the L_T_MSG to find out the message text...

Read only

0 Likes
1,213

how to do that I trying debugging but no luck

pls advsie

Read only

0 Likes
1,213

>


> >   EXCEPTIONS
> >        X_MESSAGE                     = 1
> >       INHERITED_ERROR               = 2
> >       INVALID_TYPE                  = 3
> >       OTHERS                        = 4.      
> 

>

I have highlighted the changes to the FM code.. You can see my prev. post for the full statement..

.let me know if you were able to catch the exception like that.. you can check for sys-subrc after the FM call... and check the content in L_T_MSG

Read only

Clemenss
Active Contributor
0 Likes
1,214

Hi Rubane,

check how to post as code (formatted)

INSERT L_THX_SEL INTO TABLE LT_THX_SEL.

assigning LT_THK_SEL to FM.

This code gives syntax error. How can we judge if you can't paste.

but getting some short dump What kind of?

Regards,

Clemens

Read only

0 Likes
1,213

Clemen if you read my post completely then you'll find that I did given complete code

Anyways thanks for reply

I figure out another workaround to the issue