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

Dump Error

Former Member
0 Likes
1,279

Hello friends I am having a short dump error when I execute the program.

its at the functional Module.

It occurs because I am using name1, in the tables option in the function module. However when I removed the name1 and hardcoded a value it runs fine.

DATA : name1(50) OCCURS 0 WITH HEADER LINE.

CONCATENATE it_vbrp-kunag it_vbrp-vkorg it_vbrp-vtweg it_vbrp-spart

INTO name1.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = 'Z007'

language = 'E'

name = <b>name1</b>

object = 'KNVV'

archive_handle = 0

TABLES

lines = t_stxh_text

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8.

IF sy-subrc <> 0.

ENDIF.

ANy suggestions.

Shejal

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,250

The earlier code was wrong. Try this:

data: NAME1 like THEAD-TDNAME.

It's not a table.

Rob

Message was edited by:

Rob Burbank

11 REPLIES 11
Read only

Former Member
0 Likes
1,251

The earlier code was wrong. Try this:

data: NAME1 like THEAD-TDNAME.

It's not a table.

Rob

Message was edited by:

Rob Burbank

Read only

0 Likes
1,250

just use data: name1(50).

the itab isn't reqd here..

~Suresh

Read only

0 Likes
1,250

Thanks ROb, Ferry and Suresh.

Rob,

I made it to 70 it works..whats the magic behind that.

Shejal.

Read only

0 Likes
1,250

No magic. That's how the parameter in th FM is declared. All parameters passed to FMs have to have the same charactreristics as those declared in the FM.

Rob

Read only

ferry_lianto
Active Contributor
0 Likes
1,250

Hi,

Please try to declare name1 like this.

DATA: NAME1 LIKE THEAD-TDNAME.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
1,250

Hello friends,

I am using ranges,

r_pstyv-sign = 'I'.

r_pstyv-option = 'EQ'.

r_pstyv-low = 'ZTAP'.

APPEND r_pstyv.

r_pstyv-low = 'ZCCR'.

APPEND r_pstyv.

and based on this ranges i have a select statement,

SELECT vbrk~vbeln

vbrp~posnr

vbrp~uepos

vbrp~aupos

vbrk~kunrg

vbrk~kunag

vbrp~pstyv

vbrp~aubel

vbrp~matnr

vbrk~vkorg

vbrk~vtweg

vbrk~spart

INTO TABLE it1_vbrk

FROM vbrk

INNER JOIN vbrp

ON vbrkvbeln EQ vbrpvbeln

WHERE vbrk~vkorg EQ p_vkorg

AND vbrp~pstyv NE r_pstyv

AND vbrk~erdat IN s_erdat.

I was looking into the output. It is selecting data where vbrkp~pstyv = 'ZTAP'.

I dont understand this,

any idea.

Shejal

Read only

0 Likes
1,250

You need to use IN with the range r_pstyv in your where clause. If you are trying to exclude ZTAP and ZCCR you need to populate the range like this:


r_pstyv-sign = 'E'.
r_pstyv-option = 'EQ'.

r_pstyv-low = 'ZTAP'.
APPEND r_pstyv.

r_pstyv-low = 'ZCCR'.
APPEND r_pstyv.

Read only

0 Likes
1,250

It should pick records up irrespective of what's in r_pstyv. Do you mean:

r_pstyv-sign = 'E'.
r_pstyv-option = 'EQ'.

r_pstyv-low = 'ZTAP'.
APPEND r_pstyv.

r_pstyv-low = 'ZCCR'.
APPEND r_pstyv.

SELECT vbrk~vbeln
        vbrp~posnr
        vbrp~uepos
        vbrp~aupos
        vbrk~kunrg
        vbrk~kunag
        vbrp~pstyv
        vbrp~aubel
        vbrp~matnr
        vbrk~vkorg
        vbrk~vtweg
        vbrk~spart
  INTO TABLE it1_vbrk
  FROM vbrk
    INNER JOIN vbrp
      ON vbrk~vbeln EQ vbrp~vbeln
  WHERE vbrk~vkorg EQ p_vkorg
    AND vbrp~pstyv IN r_pstyv
    AND vbrk~erdat IN s_erdat.

Rob

Read only

0 Likes
1,250

However in My select statement in am using NE, so what should be there.

Shejal.

Read only

0 Likes
1,250

Using NE is ambiguous in this case. Try it the way we suggested. But remember to use the IN operator.

Sorry - NE is wrong in this case. You have to use IN with a range.

Rob

Message was edited by:

Rob Burbank

Read only

0 Likes
1,250

Thanks Everyone.

Shejal