10-02-2007 4:07 PM
Hello Gurus,
I need to enter a material number in the selection screen. Ans when I execute I get the list from MVKE table as below -
<b>material number - sales org - dist channel - Material status (VMSTA)</b>
And now when I select a line, then the screen should direct to tcode CO09. I wrote the code for this.
But the problem is every time when I enter a new material in the selection screen, and when I select a line from the display, it goes to CO09 tcode with a default material (first material I use in the select screen).
Please help me to avoid this and each time I select a line from the display, it should go to tcode CO09 with th ematerial selected.
Regards,
Balu
10-02-2007 4:13 PM
Hi,
Did you used the HIDE comand in final output display ITAB.
loop at itab.
write:/ itab-matnr hotspot,
...........
..........
hide: itab-matnr.
clear itab.
endloop.
Thanks,
Deepak.
Message was edited by:
KDeepak
10-02-2007 4:19 PM
You asked this question yesterday. I posted code that I tested and does exactly what you want. Please check that thread.
Rob
10-02-2007 5:13 PM
Hi Rob,
The program was working fine but only the issue is everytime when I put a different material in my selection screen, it just goes to tcode CO09 with default material (which I used first time) irrespectiove of whatever material I give in the selection screen.
Regards,
balu
10-02-2007 5:18 PM
It's really hard to tell without seeing what you actually did. Would you post your code please?
Rob
10-02-2007 5:20 PM
Hi,
Are you using SET PARAMETER ID 'MAT' for populating the material field??
Thanks
Naren
10-02-2007 5:24 PM
I did that.
For the first time its working fine.
Next time when I put a new material in my selection screen and a new list appears with new materials and when I select one of this lines, the tcode is going to CO09 but with old material.
Regards,
Balu
10-02-2007 5:26 PM
10-02-2007 6:04 PM
START-OF-SELECTION.
SELECT MATNR VKORG VTWEG VMSTA FROM MVKE INTO TABLE LT_MVKE WHERE MATNR = P_MATNR .
IF SY-SUBRC = 0.
APPEND LT_MVKE.
ELSE.
EXIT.
ENDIF.
LOOP AT LT_MVKE.
FORMAT HOTSPOT ON.
WRITE: /1 LT_MVKE-MATNR, 20 LT_MVKE-VKORG, 26 LT_MVKE-VTWEG, 30 LT_MVKE-VMSTA.
HIDE: LT_MVKE-MATNR.
CLEAR LT_MVKE.
FORMAT HOTSPOT OFF.
ENDLOOP.
AT LINE-SELECTION.
SET PARAMETER ID 'MAT' FIELD CAUFVD-MATNR.
SET PARAMETER ID '1200' FIELD CAUFVD-WERKS.
SET PARAMETER ID 'A' FIELD CAUFVD-PRREG.
CALL TRANSACTION 'CO09'.
Here is my code.
The material number is not populating by default when I select a line.
Regards,
Balu
Message was edited by:
Balu
Message was edited by:
Balu
10-02-2007 6:14 PM
SET PARAMETER ID 'MAT' FIELD LT_MVKE-MATNR.
SET PARAMETER ID '1200' FIELD CAUFVD-WERKS.
SET PARAMETER ID 'A' FIELD CAUFVD-PRREG.
CALL TRANSACTION 'CO09'.
You should also hide the other parameters.
You have to hide all the parameters you will be using in the CALL TRANSACTION and then use these hidden parameters in the SET.
Rob
Message was edited by:
Rob Burbank
10-02-2007 6:17 PM
10-20-2007 12:12 AM
Hello gurus.
I have a problem with my program again.
After the lsit output, when I click on a line its going to tcode co09.
But the selected line material is not populating in the CO09 tcode. It is getting populated only if we click the line on the material number or else if we click either on sales org or dchannel or status its not updating the material number in CO09 screen.
Any ideas gurus.
Regards,
Balu
10-20-2007 12:23 AM
Hello gurus.
I have a problem with my program again.
After the list output, when I click on a line its going to tcode co09.
But the selected line material is not populating in the CO09 tcode. It is getting populated only if we click the line on the material number. But when we click either on sales org or dchannel or status on the same line its not updating the material number in CO09 screen.
Please help me out to populate the material and default parameters in the CO09 screen if we click anywhere on the listed row.
Any ideas gurus.
Regards,
Balu
10-20-2007 12:48 AM
Hi,
Please post your AT LINE-SELECTION code and your HIDE statement
Thanks
Naren
10-20-2007 1:15 AM
Naren,
Please find my code below.
LOOP AT LT2_MVKE.
FORMAT HOTSPOT ON.
WRITE: /1 LT2_MVKE-MATNR, 20 LT2_MVKE-VKORG, 35 LT2_MVKE-VTWEG, 65 LT2_MVKE-VMSTA, 85 LT2_MVKE-VMSTB.
HIDE: LT2_MVKE-MATNR. ", LT2_MVKE-VKORG, LT2_MVKE-VTWEG, LT2_MVKE-VMSTA, LT2_MVKE-VMSTB.
CLEAR LT2_MVKE.
FORMAT HOTSPOT OFF.
ENDLOOP.
AT LINE-SELECTION.
IF LT2_MVKE-VMSTA = 'Z4'.
MESSAGE E002.
ELSE.
CALL TRANSACTION 'CO09'.
SET PARAMETER ID 'MAT' FIELD LT2_MVKE-MATNR.
CLEAR LT2_MVKE-MATNR.
DATA WERKS(4) TYPE C VALUE '1200'.
SET PARAMETER ID 'WRK' FIELD WERKS.
DATA RULE(2) TYPE C VALUE 'ZB'.
SET PARAMETER ID 'PRR' FIELD RULE.
SET PARAMETER ID 'X' FIELD CAUFVD-PRMBD.
ENDIF.
Regards,
Balu
10-20-2007 1:23 AM
Is this any better:
AT LINE-SELECTION.
IF LT2_MVKE-VMSTA = 'Z4'.
MESSAGE E002.
ELSE.
SET PARAMETER ID 'MAT' FIELD LT2_MVKE-MATNR.
CLEAR LT2_MVKE-MATNR.
DATA WERKS(4) TYPE C VALUE '1200'.
SET PARAMETER ID 'WRK' FIELD WERKS.
DATA RULE(2) TYPE C VALUE 'ZB'.
SET PARAMETER ID 'PRR' FIELD RULE.
SET PARAMETER ID 'X' FIELD CAUFVD-PRMBD.
CALL TRANSACTION 'CO09'.
ENDIF
Rob
10-20-2007 2:19 AM
Rob,
Thanks for your reply.
Points assigned.
One more question, I see its working now. I will check with more data again.
Regards,
Balu
10-20-2007 2:47 AM
Rob,
I have a question. Is there anything wrong using the line
SET PARAMETER ID 'X' FIELD CAUFVD-PRMBD.
when there is no parameter ID (I use F1 to find parameter ID) for the check box with requirements in the CO09 screen.
In this case, how can I set the check box enabled.
Please help.
Regards,
Balu
10-20-2007 2:57 AM
Hi,
You can't set the parameter ID for check box. In such case you should use SUBMIT.
Regards,
Atish
10-20-2007 3:47 AM
Atish,
Can you help me how I can enable the check box after I call the tcode.
Regards,
Balu
10-20-2007 3:57 AM
If you wan tto set your checkbox, you need to cal ltransaction CO09 in mode 'E'. Populate data for first screen and call transaction in error mode.
This will open the first screen with checkbox selected.
ashish
10-20-2007 11:51 PM
Ashish,
Can you tell me in more detail.
If possible can you give me what steps I need to add.
Regards,
Balu
10-21-2007 5:58 AM
If you need to set a checkbox, populate BDC parameters into table IT_BDCTAB. Then CALL TRANSACTION CO09 in mode 'E'.
AT LINE-SELECTION.
Populate screen no and program name for CO09 in IT_BDCTAB.
Populate code for parameter MVKE-MATNR in IT_BDCTAB.
Populate code for parameter WERKS in IT_BDCTAB.
Populate code for parameter CAUFVD-PRMBD in IT_BDCTAB.
CALL TRANSACTION 'CO09' in mode 'E'.
Hope this helps.
ashish