2008 Jul 24 2:20 PM
hi,
i am using ALV and when i click on invoice it should go to MIR4 transaction with that invoice no.
its going to that transaction but its telling this invoice no. doesnt exists.
please help.
2008 Jul 24 2:28 PM
Hi Poonam Naik,
RBN is parameter id for the invoice Doc no..
Do the following in ur code.... Modify it according to structure of ur program...
FORM user_command USING ucomm TYPE sy-ucomm
selfield TYPE slis_selfield.
CASE ucomm.
WHEN '&IC1'.
IF selfield-fieldname = 'BELNR'.
SET PARAMETER ID 'RBN' FIELD selfield-BELNR.
CALL TRANSACTION 'MIR4' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM. "user_CommandHope it will solve your problem..
Thanks & Regards
ilesh 24x7
its not entering the loop.
2008 Jul 24 2:28 PM
Hi Poonam Naik,
RBN is parameter id for the invoice Doc no..
Do the following in ur code.... Modify it according to structure of ur program...
FORM user_command USING ucomm TYPE sy-ucomm
selfield TYPE slis_selfield.
CASE ucomm.
WHEN '&IC1'.
IF selfield-fieldname = 'BELNR'.
SET PARAMETER ID 'RBN' FIELD selfield-BELNR.
CALL TRANSACTION 'MIR4' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM. "user_CommandHope it will solve your problem..
Thanks & Regards
ilesh 24x7
2008 Jul 24 3:06 PM
its telling :
The data object "RS_SELFIELD" does not have a component called INVOICE.
in ur example. its near the field SELFIELD-BELNR
2008 Jul 24 3:21 PM
this is the code i have tried.:
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN '&IC1'.
IF rs_selfield-fieldname = 'INVOICE'.
SET PARAMETER ID 'VL' FIELD rs_selfield-value.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = it_final-invoice
IMPORTING
output = it_final-invoice.
CALL TRANSACTION 'MIR4' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM. "user_command
2008 Jul 24 3:40 PM
Hi Poonam Naik,
See below code ==> parameter id changed from VL to RBN as parameter id for BELNR (invoice) is RBN
Check it up ...
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN '&IC1'.
IF RS_SELFIELD-FIELDNAME = 'INVOICE'.
SET PARAMETER ID 'RBN' FIELD RS_SELFIELD-VALUE. " parameter id changed from VL to RBN
CALL TRANSACTION 'MIR4' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM. "user_commandHope it will solve your problem..
Thanks & Regards
ilesh 24x7
2008 Jul 24 3:50 PM
2008 Jul 24 2:34 PM
Hi Friend,
Use CONVERSION_EXIT_ALPHA_INPUT for invoice no before sending to MIR4.
Hope it will solve your problem.
Regards
Krishnendu
2008 Jul 24 2:47 PM
use this...
FORM user_command USING ucomm TYPE sy-ucomm
selfield TYPE slis_selfield.
CASE ucomm.
WHEN '&IC1'.
IF selfield-fieldname = 'BELNR'.
SET PARAMETER ID 'RBN' FIELD selfield-BELNR.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = S_ARSEG-BELNR
IMPORTING
OUTPUT = S_ARSEG-BELNR .
CALL TRANSACTION 'MIR4' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM. "user_Command
2008 Jul 24 2:55 PM
Hi,
I hope the below code will help you.
CASE command.
WHEN '&IC1'.
READ TABLE i_output INTO wa_output INDEX selfield-tabindex.
CASE selfield-fieldname.
WHEN 'MATNR'.
IF wa_output-matnr IS NOT INITIAL.
SET PARAMETER ID 'MAT' FIELD wa_output-matnr.
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
ELSE.
MESSAGE s000(zm) WITH text-054.
ENDIF. " If wa_output-matnr..
WHEN 'IDNRK'.
IF wa_output-idnrk IS NOT INITIAL.
SET PARAMETER ID 'MAT' FIELD wa_output-idnrk.
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
ELSE.
MESSAGE s000(zm) WITH text-054.
ENDIF. " If wa_output-idnrk IS..
WHEN 'MBLNR'.
IF wa_output-mblnr IS NOT INITIAL.
SET PARAMETER ID 'MBN' FIELD wa_output-mblnr.
SET PARAMETER ID 'MJA' FIELD wa_output-gjahr.
CALL TRANSACTION 'MB03' AND SKIP FIRST SCREEN.
ELSE.
MESSAGE s000(zm) WITH text-054.
ENDIF. " If wa_output-mblnr IS ..
WHEN 'EBELN'.
IF wa_output-ebeln IS NOT INITIAL.
SET PARAMETER ID 'BES' FIELD wa_output-ebeln.
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ELSE.
MESSAGE s000(zm) WITH text-054.
ENDIF. " If wa_output-ebeln IS ..
ENDCASE.
ENDCASE.
Thanks,
Khushbu.
2008 Jul 24 3:20 PM
Change SELFIELD-VALUE instead of SELFIELD-BELNR.
Also use CONVERSION_EXIT_ALPHA_INPUT if needed...
As sometime due to type mismatch it won't give proper output...
Check the content of SELFIELD-VALUE in debugging mode...
if it's not as the Data type and lenght of BELNR then use the FM CONVERSION_EXIT_ALPHA_INPUT
FORM USER_COMMAND USING UCOMM TYPE SY-UCOMM
SELFIELD TYPE SLIS_SELFIELD.
CASE UCOMM.
WHEN '&IC1'.
IF SELFIELD-FIELDNAME = 'BELNR'.
SET PARAMETER ID 'RBN' FIELD SELFIELD-VALUE. " I have Changed this line
CALL TRANSACTION 'MIR4' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM. "user_CommandHope it will solve your problem..
Thanks & Regards
ilesh 24x7
2008 Jul 24 3:48 PM
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |