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

issue with code

Former Member
0 Likes
2,395

Hello all,

can any one tell me why iam not able to go the idoc.

it gives me an error saying no data could be selected.

The control goes to the following command

CALL TRANSACTION 'WE05' AND SKIP FIRST SCREEN.

and i have a valid value in itab-idoc

FORM user_command USING ucomm LIKE sy-ucomm

selfield TYPE slis_selfield.

IF ucomm = '&IC1'.

READ TABLE itab INDEX selfield-tabindex.

IF sy-subrc = 0.

SET PARAMETER ID 'DCN' FIELD itab-idoc.

CALL TRANSACTION 'WE05' AND SKIP FIRST SCREEN.

ENDIF.

ENDIF.

ENDFORM.

thanks

1 ACCEPTED SOLUTION
Read only

ferry_lianto
Active Contributor
0 Likes
2,202

Hi Swathi,

Please try to convert itab-idoc using FM CONVERSION_EXIT_ALPHA_INPUT before call WE05.

DATA: WA_IDOC LIKE EDIDC-DOCNUM.

...

IF SY-SUBRC = 0.

CLEAR WA_IDOC.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

INPUT = ITAB-IDOC

IMPORTING

OUTPUT = WA_IDOC.

SET PARAMETER ID 'DCN' FIELD WA_IDOC.

CALL TRANSACTION 'WE05' AND SKIP FIRST SCREEN.

ENDIF.

...

Regards,

Ferry Lianto

19 REPLIES 19
Read only

ferry_lianto
Active Contributor
0 Likes
2,203

Hi Swathi,

Please try to convert itab-idoc using FM CONVERSION_EXIT_ALPHA_INPUT before call WE05.

DATA: WA_IDOC LIKE EDIDC-DOCNUM.

...

IF SY-SUBRC = 0.

CLEAR WA_IDOC.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

INPUT = ITAB-IDOC

IMPORTING

OUTPUT = WA_IDOC.

SET PARAMETER ID 'DCN' FIELD WA_IDOC.

CALL TRANSACTION 'WE05' AND SKIP FIRST SCREEN.

ENDIF.

...

Regards,

Ferry Lianto

Read only

0 Likes
2,202

hi ,

i guess its because you have tab strip in we05 selection selection,

i tried giving MM03 by changing THE PARAMETER I WORKED FINE THOUGH THERE WAS NO MATERIAL WITH MY IDOC NUMBER.

ISO I TRIED GIVING WE02 , EVERYTHING IS FINE BUT I GET A MESS SAYING

NO IDOCS SELECTED .

I THINK THE REASON BEHIND IT THAT WHEN I OPEN WE02 T CODE I HAVE THE FILLED WITH TODAYS DATE MAY BE DUE TO THIS I AM GEETIN AN ERROR MESSAGE .

PLS LET ME KNOW.

THANKS

Read only

0 Likes
2,202

hi,

in we05 it is not only the idoc but the time and creation date which are important. so try passing that also correctly.

may be use submit command to pass the selection tab to underlying program rseidoc2.

please understand that MM03 is a module pool screen and we02 or 05 is a program and what u are seeing is a selection screen.

use the following statement insted

SUBMIT rseidoc2 WITH SELECTION-TABLE seltab.

hope this helps.

santhosh

Read only

0 Likes
2,202

HI SANTOSH AND ALL,

SUBMIT RSEIDOC2 WITH DOCNUM = wa_idoc9

WITH CREDAT-LOW = ' '

WITH CREDAT-HIGH = ' '

AND RETURN.

i AM STILL STILL SEEING THE CREATION DATA AS TODAYS DATE IN DEBUG MODE,

THATS THE REASON WHY ITS THROWING A MESSAGE SAYING NO IDOCS SELECTED.

THANKS

Read only

0 Likes
2,202

Do it like this.


RANGES : R_DATE TYPE SY-DATUM

SUBMIT RSEIDOC2 WITH DOCNUM = wa_idoc9
WITH CREDAT = R_DATE[].

This will work

Regards,

Ravi

Note - Please mark all the helpful answers

Read only

0 Likes
2,202

hey swathi,

arnt u passing any date that i think is mandatory pass a valid date.

santhosh

Read only

0 Likes
2,202

hi,

i think what Mr Ravikumar suggested should work but you need to fill the sign and option of the range as I and BT and then append the range before it is passes. i.e

r_date-sign = 'I'.

r_date-Option = 'BT'.

append r_date.

santhosh

Read only

0 Likes
2,202

Hi santosh,

SUBMIT RSEIDOC2 WITH DOCNUM = wa_idoc9

WITH CREDAT-LOW = ITAB-DATE

WITH CREDAT-HIGH = ITAB-DATE

once i go there the values for credat is again the todays date,even though i have avalid data in itab-date

Hi ravi,

RANGES : R_DATE FOR EDIDC-CREDAT.

SUBMIT RSEIDOC2 WITH DOCNUM = wa_idoc9

WITH CREDAT = R_DATE[] and return.

ranges : r_data type sy-datum gives me an error.

please let me know.

error

Wrong type passing parameters to "CREDAT

thanks

Read only

0 Likes
2,202

hi,

I dont see the reason too.

one solution which is not totally correct would be

SUBMIT RSEIDOC2 via selection-screen WITH DOCNUM = '682941'

and return.

this would leave at the selection screen and u can change the date atleast u have the doc ;).

hope it helps.

santhosh

Read only

0 Likes
2,202

Try this

SUBMIT RSEIDOC2 WITH DOCNUM = wa_idoc9

WITH CREDAT IN R_DATE AND RETURN.

This should work.

Regards,

Ravi

note - Please mark all the helpful answers

Read only

0 Likes
2,202

SUBMIT RSEIDOC2 WITH DOCNUM = wa_idoc9

WITH CREDAT IN R_DATE AND RETURN.

yes that works!.

santhosh

Read only

0 Likes
2,202

Hi SANTOSH,

SUBMIT RSEIDOC2 VIA SELECTION-SCREEN WITH DOCNUM = wa_idoc9

  • WITH CREDAT = R_DATE[]

WITH CREDAT-LOW = '09/01/2006'

WITH CREDAT-HIGH = '11/30/2006'

AND RETURN.

tHIS TAKES ME TO SELECTION SCREEN WITH THE IDOC NUMBER AND AGAIN THE DATA FIELD IS FILLED WITH TODAYS DATA.

have you tried at your end.

my req is to see the idoc not the selection screen.

if any one have any ideas please let me know

Thanks

Read only

0 Likes
2,202

SUBMIT RSEIDOC2 WITH DOCNUM = wa_idoc9

WITH CREDAT IN R_DATE AND RETURN.

yes that works!.

santhosh

Read only

0 Likes
2,202

Hi,

Thanks Ravi and santosh in walking along with me to achieve this.

I awarded full points to you both.

thanks again.

swathi

Read only

Former Member
0 Likes
2,202

when executed WE05 it shows a selection screen wherein u need to specify values and execute the same...So, ur just calling WE05 but the values are not passed into the selection screen....Either u have to use some other transaction wherein just by specifying value it displays data....(example like VL03 where u pas documnet number and it displays data).

Read only

Former Member
0 Likes
2,202

hi,

in we05 it is not only the idoc but the time and creation date which are important. so try passing that also correctly.

may be use submit command to pass the selection tab to underlying program rseidoc2.

SUBMIT rep WITH SELECTION-TABLE seltab.

hope this helps.

santhosh

Message was edited by:

Kaluvala Santhosh

Read only

ferry_lianto
Active Contributor
2,202

Hi,

Why don't you use this FM EDI_DOCUMENT_TREE_DISPLAY instead of call WE05.

It gives the same result at the end.


...
CALL FUNCTION 'EDI_DOCUMENT_TREE_DISPLAY'
  EXPORTING
    DOCNUM        = ITAB-IDOC
  EXCEPTIONS
    NO_IDOC_FOUND = 1
    OTHERS        = 2.
...

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
2,202

hi ,

in ur case CASE statement to be use.

Read only

ferry_lianto
Active Contributor
0 Likes
2,202

Hi Swathi,

Did you try FM EDI_DOCUMENT_TREE_DISPLAY?

It is easy and simpler than submit program RSEIDOC2.

Let me know your thought.

Regards,

Ferry Lianto