2006 Nov 17 8:17 PM
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
2006 Nov 17 8:19 PM
The earlier code was wrong. Try this:
data: NAME1 like THEAD-TDNAME.
It's not a table.
Rob
Message was edited by:
Rob Burbank
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
2006 Nov 17 8:19 PM
The earlier code was wrong. Try this:
data: NAME1 like THEAD-TDNAME.
It's not a table.
Rob
Message was edited by:
Rob Burbank
2006 Nov 17 8:22 PM
2006 Nov 17 8:24 PM
Thanks ROb, Ferry and Suresh.
Rob,
I made it to 70 it works..whats the magic behind that.
Shejal.
2006 Nov 17 8:28 PM
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
2006 Nov 17 8:20 PM
Hi,
Please try to declare name1 like this.
DATA: NAME1 LIKE THEAD-TDNAME.
Regards,
Ferry Lianto
2006 Nov 17 9:48 PM
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
2006 Nov 17 9:53 PM
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.
2006 Nov 17 9:55 PM
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
2006 Nov 17 9:55 PM
However in My select statement in am using NE, so what should be there.
Shejal.
2006 Nov 17 9:58 PM
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
2006 Nov 17 10:15 PM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |