03-09-2010 12:11 PM
I have made a BDC for MM01 whose scenario is as follows:
1.First select the path of EXCEL file and execute.
2.Then a Pop Up appears which ask a confirmation that Do You Wish To Upload Excel File? When user says yes then an ALV gets
displayed.
3.The use of ALV is to display the MATNR having error ie i have done some checkings related to SPART,MTART,Plant And PRCTR
relation etc.( The issue is not about ALV )
4.When the ALV is displayed at that time a BACK button and CANCEL button is also displayed with the help of PF STATUS.
The requirement is that first you display an ALV of the material containing error .The errors will be corrected in EXCEL file
and then the same file is to be again checked.If this time it does not contain any error then the records should be uploaded
otherwise it should leave the program.
I have completed the ALV display and the PF status button display.I want that when the ALV contains any error the user
should correct the EXCEL file.When BACK button is clicked then the screen to select the file should come(which is not coming).
so that the user can select the same corrected file once again.Again it should ask for confimation and again it should do
all the checkings.This should be repeated till all the errors are rectified.Once all the errors are rectified then the
uploadiing should be performed.
Also the CANCEL button is not working which should leave the program.For this I have tried the following
i) LEAVE SCREEN TO 1000.
ii) LEAVE PROGRAM.
iii)LEAVE LIST PROCESSING.
EXIT.
03-09-2010 12:15 PM
In the ALV user-command form set the field exit of the structure of the type slis_selfield to 'X'. This way it shoud exit the ALV just fine.
rs_selfield-exit = 'X'.
03-09-2010 12:15 PM
In the ALV user-command form set the field exit of the structure of the type slis_selfield to 'X'. This way it shoud exit the ALV just fine.
rs_selfield-exit = 'X'.
03-09-2010 1:05 PM
Hi Devendra,
Hope you have already pass the following parameter to your ALV function module.
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
After ALV when you click on BACK button, to get the screen to select the file:
Create subroutine USER_COMMAND and you have to retirive the function code for BACK button.
use the following coding part:
FORM user_command USING value(r_ucomm) TYPE sy-ucomm
CHANGING rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN 'BACK'.
PERFORM upload_corrected_file.
rs_selfield-refresh = 'X'.
ENDCASE.
ENDFORM.
Hope this will help.
Regards,
Ashish
03-09-2010 1:17 PM
Hi,
first of all what is the need of custom 'BACK' and 'CANCEL' button.
Is already available in standard.
03-11-2010 5:04 AM
The Back Button of Standard toolbar is working fine and able to select the file once again but the EXECUTE button of
PF Status shown on ALV when clicked throws a runtime exception----Too many parameters specified with perform.
The issue is for BDC for mm01.
KIndly Gudie me through this .
Thanks & Rgds
03-11-2010 5:13 AM
Hi,
I feel that the design can be improved still better. Why do you want to upload the file again and again??? Why can't we provide editable ALV and highlight the error records? It would be easy for the user to correct the errors in ALV rather than in excel as we have F4 help and standard messages(In case fieldcat has check table)
Also your subject and actual question are deviating. If you are using BDC, please give a second thought. We have BAPI available for this.
Search in SE37 with BAPIMATERIALCHANGE*
Thanks,
Vinod.
03-11-2010 10:16 AM
Hi ,
You just asked about the 'back' and 'cancel' button...now where does the 'execute' button comes from ?
03-12-2010 4:14 AM
Sorry,forgot to tell that I have replaced the BACK button with the EXECUTE
button.
But my requirement is that when the user clicks the EXECUTE button then the
subroutine named PERFORM BDC_OPERATION should take place and with that the
material should be uploaded.When I click on the EXCEUTE button then it
throws a runtime exception----Too many parameters specified with perform.
Kindly Guide .
03-12-2010 4:24 AM
Hi,
Check the number of parameters specified in FORM and PERFORM. They are differing. Hope it is Dynamic call!!!
Thanks,
Vinod.