11-06-2008 3:18 AM
I've a BDC program that needs to upload certain data. However, when i try to execute the report, the program abruptly exits from the "at selection-screen" statement to the main screen. I checked the value of sy-ucomm and it shows CRET.
However when i tried running the same program on a different server it ran fine .... with the sy-ucomm value shown as ONLI .
I'd appreciate any help possible. Thanks!!!
11-06-2008 3:29 AM
Hi,
Can you post some related code here so as to make it more clear?
Regards,
Chris Gu
11-06-2008 3:38 AM
Hi Chris,
I've attached a snippet of the code. The rest of the code mostly deals with certain validations and processing.
selection-screen begin of block bomhder
with frame title text-001.
parameters : plant like mast-werks obligatory memory id wrk,
bom_use like ybombdc-bom_use OBLIGATORY DEFAULT 'X', "-RR01
bom_use like ybombdc-bom_use obligatory default '1',"+RR01
alt_bom like mast-stlal obligatory default '01'.
parameter i_app like ybombdc-appl default 'PP01' no-display.
select-options bom_mat for mast-matnr no-display matchcode object mat1"+RR01
memory id mat no intervals. "+RR01
selection-screen end of block bomhder.
selection-screen begin of block itmcat with frame title text-002.
*{ REPLACE P2PK900203 2
*\ PARAMETERS : ITEMCAT LIKE YBOMBDC-ITEM_CAT OBLIGATORY DEFAULT 'N'.
parameters : itemcat like ybombdc-item_cat obligatory default 'L'.
*
*} REPLACE
parameters : changeno like rc29a-aennr no-display "+RR01
memory id aen default '??'. "no intervals no-extension. "+RR01
**SELECTION-SCREEN PUSHBUTTON 50(17) text-019
USER-COMMAND cc01. " [modif id <key>].
**SELECTION-SCREEN PUSHBUTTON 68(10) text-020
USER-COMMAND cc02. " [modif id <key>].
selection-screen end of block itmcat.
selection-screen begin of block datafile
with frame title text-003.
parameters : filename like rlgrap-filename
default 'c:\my documents\bomdownload.txt' memory id zdr,
filetype(3) default 'DAT' no-display,
excelexe like rlgrap-filename
default 'C:\Program Files\Microsoft Office\Office12\excel.exe'.
selection-screen end of block datafile.
selection-screen begin of block qty
with frame title text-018.
selection-screen begin of line.
selection-screen comment 2(15) text-015
for field sum_ind.
parameters : sum_ind as checkbox default ' '. "+RR01
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 2(15) text-017
for field qty_tot.
parameters : qty_tot radiobutton group qty default 'X'.
selection-screen comment 27(15) text-016
for field qty_inc.
parameters : qty_inc radiobutton group qty.
selection-screen end of line.
selection-screen end of block qty.
selection-screen function key 1.
selection-screen function key 2.
selection-screen function key 3.
at selection-screen output.
loop at screen.
if screen-name = 'BOM_USE'. "+RR01
screen-input = '0'.
modify screen.
endif.
if screen-name = 'ITEMCAT'.
screen-input = '0'.
modify screen.
endif.
if screen-name = 'SUM_IND'. "+RR01
screen-invisible = '1'.
modify screen.
endif.
if screen-name = 'QTY_INC'. "+RR01
screen-invisible = '1'.
modify screen.
endif.
endloop.
INITIALIZATION.
move 'Read Me' to sscrfields-functxt_01.
move 'Download BOM' to sscrfields-functxt_02.
at selection-screen.
if sscrfields-ucomm = 'FC01'.
perform display_readme_text using 'Z_README_ZPSB-19V'.
endif.
if sscrfields-ucomm = 'FC02'.
perform download_existing_bom.
endif.
if sscrfields-ucomm = 'CC01'.
call transaction 'CC01'. " and skip first screen.
endif.
if sscrfields-ucomm = 'CC02'.
call transaction 'CC02'. " and skip first screen.
endif.
perform input_validation_change.
at selection-screen on help-request for sum_ind.
perform display_readme_text using 'Z19V_F1_SUMIND'.
at selection-screen on help-request for qty_tot.
perform display_readme_text using 'Z19V_F1_QTYTOT'.
at selection-screen on help-request for qty_inc.
perform display_readme_text using 'Z19V_F1_QTYINC'.
at selection-screen on value-request for filename.
perform f4_for_filename using filename.
at selection-screen on value-request for excelexe.
perform f4_for_filename using excelexe.
The program exits at the point that i've marked in BOLD .
Thanks!!!
Edited by: Ritwik Rajkumar on Nov 6, 2008 4:38 AM
02-15-2011 4:08 PM
I know it's an old post, but as I'm new on ABAP, someone may found the same problem.
I created a program that has some select options, and then represents the search on an ALV.
My problem was when creating the transaction you got to choose the second option on the object execution.
program and screen of selection (report transaction)
and not
program and screen (dialog transaction).
On first, ive created the transaction with the option program and screen, and the sy-ucomm value was CRET, strange for me as well.
When i've created again the transaction with program and screen of selection, sy-ucoom was ONLI.
Worked for me.