How to pass Function code to Submit or Call transaction command
Hi
I have to call a report in an other report, But the problem is when i call the report through submit command i need to skip the initial screen and display an other screen. the other screen is not next screen. It display after clicking a button on main screen.
Is there any way to pass Function code to submit command. submit command code is as under
SUBMIT ZADR0056
WITH P_AUFNR = '7000052' AND RETURN...
Regards
Ammad
Hi,
It is not possible to pass function code with submit. alternatively you can work with CALL TRANSACTION with BDCDATA.
Or as a work arround way you can modify your code i.e check for function code or an dummy parameter which can be passed by SUBMIT statement.
Check below code..
Report ztest1.
submit ZTEST2 WITH P2 = 'X' AND RETURN.
Report ztest2
SELECTION-SCREEN:
PUSHBUTTON 2(10) but1 USER-COMMAND cli1.
PARAMETERS P2 TYPE C NO-DISPLAY. " no need to display
AT SELECTION-SCREEN.
IF SY-UCOMM = 'CLI1' OR P2 IS NOT INITIAL.
message 'Button clicked' type 'S'.
ENDIF.
Regards,
Ravi.
Similar Messages
-
How to find function code for buttons on toolbar in oops alv
Hi experts,
I want to remove some buttons from toolbar in oops alv, i know the procedure like get function code and pass the value in a table and pass that table to IT_TOOLBAR_EXCLUDING of
method set_table_for_first_display but I WANT TO KNOW HOW TO FIND FUNCTION CODE FOR BUTTONS ON TOOLBAR IN OOPS ALVHi Prakash,
-->First you have to set the pf status in your alv program by,
{FORM pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'FIRST'.
ENDFORM. "PF_STATUS}
-->Pass this Subroutine name in the Function module, Reuse_alv_grid_display's parameters i.e,
i_callback_pf_status_set = 'PF_STATUS'}
*-->Then doble click on that pf status,
From the menu bar, select Extras->Adjust Template->List Viewer,
This will give you the existing statndard gui status of the program*
->Then catch that function codes in the User command Parameter of the Function module Reuse.. i.e,
i_callback_user_command = 'COMM'
And make a subroutine of the name 'COMM'i.e,
FORM comm USING ucomm LIKE sy-ucomm selfield TYPE slis_selfield.
DATA: okcode TYPE sy-ucomm.
okcode = ucomm.
CASE okcode.
WHEN 'REF'.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = 'MANSI'
txt1 = 'CREATED BY'
txt2 = SY-UNAME
TXT3 = ' '
TXT4 = ' '
endcase.
Hope it helps you
Regrds
Mansi -
How to get function code of enter button in bdc manually
hi
i need to know how to get function code of enter button in bdc manually like in screen i want to capture techincal infor of enter buttion and itd fucntion cod ehow can i get it i mean what is the key in keyboard to display that
i want to capture enter button and for eg status button etc funtion code
pls suggest
aroraHi,
Want you need to do is go to transaction SHDB and record the bdc for the transaction you want, during transaction press the buttons for which you want the bdc code. And after this go press the back button and check the list of all the things recorded in Recorder.
And for SHDB help check this link:
http://abaplovers.blogspot.com/2008/02/recording-bdc-using-transaction-shdb.html
Hope this helps.
Regards,
Qamar. -
How to pass values to select options of custom transactions?
I have to call custom transaction-ZMM_POST from my custom report.
I have to pass values to select options(Not to parameters) of ZMM_POST from my report only.
Please tell me how to pass values to select options of custom transactions?Have you tried this?
DATA: T_RSPARAMS TYPE STANDARD TABLE OF RSPARAMS WITH HEADER LINE.
T_RSPARAMS-SELNAME = "S_BUKRS".
T_RSPARAMS-KIND = "S".
T_RSPARAMS-SIGN = "I".
T_RSPARAMS-OPTION = "BT".
T_RSPARAMS-LOW = "100".
T_RSPARAMS-HIGH = "300"
APPEND T_RSPARAMS.
SUBMIT Z_DUMMY WITH SELECTION-TABLE T_RSPARAMS.
Greetings,
Blag. -
How to do the job scheduling in BDC Call transaction
Hi Experts,
I've a Query like how to do the job scheduling in BDC Call transaction
If anybody knows the answer please send me the reply.
Thanks.
Regards,
RekhaHi ,
any progarm can be scheduled, wether it may be BDC or report thru SM36 Tcode.
But do rememeber that if ur BDC is using GUI_UPLOAD function module, then it wont work , coz the function Gui_upload or GUI_DOWNLOAd wont work in back ground.
If u r going to use OPEN_DATASET , READ dataset ....then it can be scheduled. i.e BDC can work if ur program retrievesz the data from Application server.
Rvert back if any issues,
Reward with poinst if helpful.
Regards,
Naveen -
How to pass radiobuttons using a submit statements.
Hi All,
Can anyone tell me how to pass radiobuttons using Submit statement.
My problem is that I am able to pass one select option and one parameter using the statement:
submit (v_repid) to sap-spool without spool dynpro
spool parameters s_print_parms
using selection-screen '1000' WITH SELECTION-TABLE t_rspar_tab
and return.
This selection screens got to check selections based on 2 radio buttons available in the selection screen which also i need to pass through SUBMIT.Please let me know how do i pass this to the Submit statement.
Thankx in advance...
Helpful answers will be rewarded fully...Hi Susanth,
Create Variant for the calling program, Give that variant( here in the below program variant for calling program that I created is VAR1) in the calling program in SUBMIT Statement.
<b>
CALLING PROGRAM:
</b>
data:
w_variant(5) TYPE c VALUE 'VAR1'.
SUBMIT YH625_CALLED_PROGRAM USING SELECTION-SET w_variant.
<b>CALLING PROGRAM:</b>
TABLES spfli.
parameters:
w_radio1 RADIOBUTTON GROUP g1,
w_radio2 RADIOBUTTON GROUP g1.
SELECT-OPTIONS s_table FOR spfli-carrid.
WRITE '*************** This is Called program output **********************'.
Hope this solves your problem.
If you any query you are welcome.
Regards,
V.Raghavender. -
How to translate function codes from GUI-status into other language ?
Hello experts,
I've a programm called mrs - multi resource scheduling.
This programm has texts in english and german.
Now I want to translate the text also in italian.
When I opne the programm in se80, in path GUI-status
there are the ui-elements (Function codes).
When I open them in english, I get the texts in english, when
I open them in german , I get the texts in german.
Openeing in italian shows me the english texts.
Changing them into italian I get message:
You can only maintain the object in modification
lang. German (DE) in this system
If I proceed in translating the german text in italian, I get italian texts instead of german.
Some ideas ?
Thanks GerdUse [SE63|https://www.sdn.sap.com/irj/scn/advancedsearch?query=se63&cat=sdn_all].([Translating Objects Directly|http://help.sap.com/saphelp_nw04/Helpdata/EN/41/71601b3ab0f34a8e00aa01338c68f3/content.htm]) else work on a system where italian language is installed.
Regards -
How to create function code for field in GRID like list box in screen
Hi all,
I have requirement like drop down is created for field1 in GRID,
and have given f4 help for it, as soon as i change the data in the field
event has to trigger to update thevalues in other field.
This scenario i worked on screens where field is created with listbox and assign function code to it
when the field value changes the event triggers .
Is there is anything like that which will fire the event for field value changes.
can i update anything through the fieldcatalogue.
anybody help me on this
Regards,
MadhaviHi Madhavi,
yes we can do that by registering edit events..
check the below example.. has both the variants dropdown/f4 hlp...
screen flow logic
PROCESS BEFORE OUTPUT.
MODULE pbo.
PROCESS AFTER INPUT.
MODULE pai AT EXIT-COMMAND.
program
* CLASS lcl_event_responder DEFINITION *
CLASS lcl_event_responder DEFINITION.
PUBLIC SECTION.
DATA : ls_changed_cell TYPE lvc_s_modi,
lv_language TYPE spras..
METHODS refresh_changed_data FOR EVENT data_changed
OF cl_gui_alv_grid
IMPORTING er_data_changed
e_ucomm.
ENDCLASS. "event_responder DEFINITION
DATA: go_handler TYPE REF TO lcl_event_responder,
go_container TYPE REF TO cl_gui_custom_container,
go_grid TYPE REF TO cl_gui_alv_grid,
gt_fieldcat TYPE lvc_t_fcat,
gv_language TYPE spras VALUE 'E',
gt_outtab TYPE TABLE OF makt WITH HEADER LINE.
PARAMETERS : dropdown TYPE char01 RADIOBUTTON GROUP grp,
f4help TYPE char01 RADIOBUTTON GROUP grp.
START-OF-SELECTION.
CALL SCREEN 100.
END-OF-SELECTION.
* MODULE PBO OUTPUT *
MODULE pbo OUTPUT.
SET PF-STATUS 'BASIC'.
PERFORM create_and_init_alv CHANGING gt_outtab[]
gt_fieldcat.
ENDMODULE. "pbo OUTPUT
* MODULE PAI INPUT *
MODULE pai INPUT.
SET SCREEN 0. LEAVE SCREEN.
ENDMODULE. "pai INPUT
FORM create_and_init_alv CHANGING pt_outtab LIKE gt_outtab[]
pt_fieldcat TYPE lvc_t_fcat.
CHECK go_container IS NOT BOUND.
CREATE OBJECT go_container
EXPORTING
container_name = 'CUSTOM'.
CREATE OBJECT go_grid
EXPORTING
i_parent = go_container.
PERFORM build_display_table.
PERFORM build_fieldcat CHANGING pt_fieldcat.
IF dropdown EQ abap_true.
PERFORM set_drdn_table.
ENDIF.
go_grid->set_table_for_first_display( CHANGING it_fieldcatalog = pt_fieldcat
it_outtab = pt_outtab ).
go_grid->set_ready_for_input( 1 ).
" raises the 'data_changed' event when we select another cell/any action after changing the data
go_grid->register_edit_event( EXPORTING i_event_id = cl_gui_alv_grid=>mc_evt_modified ).
CREATE OBJECT go_handler.
SET HANDLER go_handler->refresh_changed_data FOR go_grid.
ENDFORM. "CREATE_AND_INIT_ALV
FORM build_display_table.
FREE gt_outtab.
SELECT * FROM makt UP TO 20 ROWS INTO TABLE gt_outtab WHERE spras EQ gv_language.
ENDFORM. "build_display_table
FORM build_fieldcat CHANGING pt_fieldcat TYPE lvc_t_fcat.
DATA ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'MAKT'
CHANGING
ct_fieldcat = pt_fieldcat.
LOOP AT pt_fieldcat INTO ls_fcat.
IF ls_fcat-fieldname EQ 'SPRAS'.
ls_fcat-edit = abap_true..
ls_fcat-outputlen = 8.
IF dropdown EQ abap_true.
ls_fcat-drdn_hndl = '1'.
ls_fcat-checktable = '!'. "do not check foreign keys
ENDIF.
MODIFY pt_fieldcat FROM ls_fcat.
ENDIF.
ENDLOOP.
ENDFORM. "build_fieldcat
FORM set_drdn_table.
CHECK go_grid->offline( ) IS INITIAL.
DATA: lt_dropdown TYPE lvc_t_drop,
ls_dropdown TYPE lvc_s_drop.
ls_dropdown-handle = '1'.
ls_dropdown-value = 'EN'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = 'DE'.
APPEND ls_dropdown TO lt_dropdown.
CALL METHOD go_grid->set_drop_down_table
EXPORTING
it_drop_down = lt_dropdown.
ENDFORM. " set_drdn_table
FORM change_display_table USING pv_language pv_rowno TYPE i.
READ TABLE gt_outtab INDEX pv_rowno.
SELECT SINGLE * FROM makt INTO gt_outtab WHERE matnr = gt_outtab-matnr AND spras = pv_language.
IF sy-subrc EQ 0.
DELETE gt_outtab INDEX pv_rowno.
INSERT gt_outtab INDEX pv_rowno.
ELSE.
CLEAR : gt_outtab-maktx,
gt_outtab-maktg.
DELETE gt_outtab INDEX pv_rowno.
INSERT gt_outtab INDEX pv_rowno.
ENDIF.
ENDFORM. "change_display_table
* CLASS event_responder IMPLEMENTATION *
CLASS lcl_event_responder IMPLEMENTATION.
METHOD refresh_changed_data.
READ TABLE er_data_changed->mt_mod_cells INTO ls_changed_cell INDEX 1.
CALL FUNCTION 'CONVERSION_EXIT_ISOLA_INPUT'
EXPORTING
input = ls_changed_cell-value
IMPORTING
output = lv_language.
PERFORM change_display_table USING lv_language ls_changed_cell-row_id.
go_grid->refresh_table_display( ).
ENDMETHOD. "click
ENDCLASS. "event_responder IMPLEMENTATION
Cheers,
Jose. -
Dear SAP friends,
Does anybody knows an easy way to find function codes ( those of type ui_func) of standard ALV grid toolbar?
Searching this forum I learned that you can do se11 and read table RSMPTEXTS for program SAPLSVLV_FULLSCREEN or just se41 for program SAPLSVLV_FULLSCREEN.
Shouldn't there be some kind of complete Reference about function codes of standard ALV grid?
Please share if you know.
Thank you
TatyanaThank you, Ferry.
Reading method BUILD_COMPLETE_TOOLBAR of class CL_GUI_ALV_GRID you
can see an icon code, function code and text for the buttons of standard ALV grid toolbar.
Regards,
Tatyana -
How to clear all selection screen parameters before calling transaction?
Hi Experts
I have a ABAP report that displays data using ALV.
When I double click a cell it calls transaction MB51. Before calling the transaction I need to set some parameters of the selection screen of the transaction.
My code is like below:
<UL>
<LI>FREE MEMORY ID 'MAT'. <I>"material</I>
<LI> FREE MEMORY ID 'WRK'. <I>"plant</I>
<LI> FREE MEMORY ID 'CHA'. <I>"batch</I>
<LI><I>* Get the selected ALV row data</I>
<LI>READ TABLE i_recon INDEX p_selfield-tabindex INTO x_recon.
<LI><I>* If link MB51 is clicked then open tcode MB51</I>
<LI> IF p_selfield-sel_tab_field+8(4) = 'MB51'.
<LI><I>* Pass material, plant to the corresponding tcode</I>
<LI> SET PARAMETER ID 'MAT' FIELD x_recon-matnr.
<LI> SET PARAMETER ID 'WRK' FIELD p_plant.
<LI> CALL TRANSACTION 'MB51' AND SKIP FIRST SCREEN.
</UL>
The problem is:
<UL> <LI> 1. First, I run the given transaction before running the report in a separate session with some set of values in the selection screen. For example: plant = AB01, Material = 990001 and Batch = 10001.</LI>
</UL>
<UL>
<LI> 2. Then in another session I run my report. In the report ALV I have selected a record where plant = AB01, Material = 990001 but Batch is blank. But it opens the transaction with plant = AB01, Material = 990001 and Batch = 10001.
Even though in my ALV record the batch is blank yet it uses the batch value from the memory. That is, the batch value that was given in the transaction earlier. Why it is not getting cleared? I have also used FREE MEMORY ID code in the beginning. But still it is not clearing the values in the memory.
</UL>
<UL>
<LI>What shall I do to clear all the selection screen parameters before calling the transaction?</LI>
</UL>
<UL>
<LI>
Thanks
Gopal
</LI>
</UL>
Edited by: gopalkrishna baliga on Aug 11, 2010 10:29 AMIts because sap memory is globally shared.
Do it like this.
READ TABLE i_recon INDEX p_selfield-tabindex INTO x_recon.
IF p_selfield-sel_tab_field+8(4) = 'MB51'.
perform bdc_dynpro using 'RM07DOCS' '1000'.
perform bdc_field using 'BDC_OKCODE' '=ONLI'.
perform bdc_field using 'MATNR-LOW' x_recon-matnr.
perform bdc_field using 'WERKS-LOW' p_plant.
perform bdc_field using 'CHARG-LOW' p_batch.
perform bdc_field using 'DATABASE' 'X'.
call transaction 'MB51' with i_bdcdata mode 'E'.
endif.
form bdc_dynpro using program dynpro.
clear la_bdcdata.
la_bdcdata-program = program.
la_bdcdata-dynpro = dynpro.
la_bdcdata-dynbegin = 'X'.
append la_bdcdata to i_bdcdata.
endform.
form bdc_field using fnam fval.
clear la_bdcdata.
la_bdcdata-fnam = fnam.
la_bdcdata-fval = fval.
append la_bdcdata to i_bdcdata.
endform. -
How to get the set pf-status and call Transaction work together in SA
hi,
I am using Set pf-status to display the details screen and the same time using call transaction va03 leave screen 0 to display the corresponing sales order.
The issue is both of them are not workin together properly.
it could be helpfull if you give some code which deals the issue in detail...
can you please give details how to get the previous screen once the new screen is obtained thru set pf-status
thanks and regards
Edited by: san dep on Jul 10, 2008 6:25 PMHi,
Try this code ---
SET PF-STATUS 'STATUS_NAME' OF PROGRAM 'ZPROGRAM_NAME'.
Regards
Pinaki -
How to create bdc for fbs1 using both call transaction and session
Hi Friends,
i have one problem with tcode FBS1, i need to create a bdc program for both call transaction and session method using subroutine.
first call transaction needs to execute if there is an error sesion has to execute. if u have code please forward.
thanks in advance.
chandramouli pothuguntawhere as in call transaction we can do error handling explictly.those errors are stored in one file .this file will send to the error log(session method),i.e session log.
in the above case we use both call transaction n session method at time in one program.sample code is below ,go through it .
data : begin of itxk01 occurs 0,
end of itxk01.
data : bdcdata like itbdcdata occurs 0 with header line.
data : itbdcmsgcoll like itbdcmsgcoll occurs 0 with header line,
itxk01 like itxk01-dup occurs 0 with header line.
call gui-upload.
loop at itxk01.
refresh itxk01.
perform bdc-dynpr0 using 'prg' 'scr'
perform bdc-dynfld using fnam fval
call transaction 'xk01' using bdcdata mode 'a' update 's' messages into itbdcmsgcoll.
if sy-subrc ne 0.
append itxk01 into itxk01-dup.
endif.
endloop.
if not itxk01-dup[] is initial.
refresh itck01.
call bdc_open_group
itxk01 = itxk01-dup.
loop at itxk01.
refresh itxk01.
perform bdc-dynpr0 using 'prg' 'scr'
perform bdc-dynfld using fnam fval
call bdc-insert.
endloop.
call bdc-close-group.
form bdc-dynpr0 using pr sc
endform .
form bdc-field using fnam faval
endform.
this will help u.
reward points for me
kiran -
How to suppress a warning message in BDC call transaction
Hi,
I was calling a BDC using CALL Transaction in mode N. But due to some warning messages the background job was not success. Please tell me how to overcome the warning messages in BDC.
Regards,
SatishHi tyr this way:
PERFORM bdc_dynpro USING 'SAPMM07M' '0210'. " into the screen
PERFORM bdc_field USING 'BDC_CURSOR' "cursor on the filed to update
'DM07M-HSDAT_INPUT'.
PERFORM bdc_field USING 'DM07M-HSDAT_INPUT' "assign values
v_date. "might get an warning so three enters...
PERFORM bdc_field USING 'BDC_OKCODE' " first enter
'/00'.
PERFORM bdc_field USING 'BDC_OKCODE' "second enter
'/00'.
PERFORM bdc_field USING 'BDC_OKCODE' "third enter
'/00'. -
How to pass Internal table in submit
Hi Friends-
i have a internal table with two fields it is like
begin of error occurs 0,
num(8) type n,
msg(50) type c,
end of error .
now this table i have to submit in another report and i have to use this table in that other report
but how i can pass this in submit pls guide me.
Regards
MeetaHi ,
I am writing the 2 options that I know of my knowledge:
OPTION 1 :
in prog1
loop at itab.
r_matnr-sign = 'I'.
r_matnr-option = 'EQ'.
r_matnr-low = itab-matnr.
append r_matnr.
clear r_matnr.
endloop.
submit prog2 via selection-screen
with s_matnr in r_matnr and return.
in prog2
select-options: s_matnr for mara-matnr no-display.
loop at s_matnr.
itab-matnr = s_matnr-low.
append itab.
clear itab.
endloop.
OPTION 2:
report zashish_1.
data: imara type table of mara with header line.
start-of-selection.
select * into table imara from mara up to 10 rows.
export imara to memory id 'YOURID'.
submit zashish_2 and return.
The submitted program.
report zashish_2 .
data: imara type table of mara with header line.
import imara from memory id 'YOURID'.
loop at imara.
write:/ imara-matnr.
endloop.
Hope these option might have clarified most of your doubts.
Regards,
Ashish Arora -
Hi,
I'm trying to interface a camera with Labview. However, the camera can only be programmed by C, so I'm using Labwindow CVI.
I need to pass a camera handle from one function to another, eg. from a opencamera function to setparameter function.
/* Load the Qcam driver and Open the First Camera */
void DLLEXPORT LoadDriverAndOpenCamera()
QCam_CamListItem cameraList[10];
unsigned long cameraListLength=sizeof(cameraList)/sizeof(cameraList[0]);
//load the driver
QCam_LoadDriver();
//get a list of the cameras
QCam_ListCameras(cameraList,&cameraListLength);
//listLength is now the number of cameras available
QCam_Handle hCam;
//Open the first camera in the list
QCam_OpenCamera(cameraList[0].cameraId, &hCam);
Apparently, caemraId is an unsigned long (unsigned 32-bit in Labview 2012 32-bit? ) and QCam_Handle is defined as void*, so it's a pointer that points to an unsigned 32-bit.
When I only use C for programming, I can pass hCam variable to other functions as long as it's declared as global variable. Ex, the next function can be void SetParameter(QCam_Handle hCam). However, here I'm trying to make a dll by Labwindows/CVI and then call LoadDriverAndOpenCamera() function through library call in Labview.
My question is: How can I pass hCam to other functions in the same dll? Do I have to add paramter to the function? For example:
void DLLEXPORT LoadDriverAndOpenCamera(unsigned long cameraId, QCam_Handle* cameraHandle)
And then add two lines:
cameraId=cameraList[0].cameraId;
cameraHandle=hCam;
into the function? Then I can pass cameraHandle out? However, hCam will still have void* type.
Even if that's the case, how can I set up library call node on Labview? In the arg parameter set up, I don't see pointers? It seems I cannot set up an output node to be a pointer that points to a unsigned long.
Thank you very much for your help!
Best,
Charles
Solved!
Go to Solution.Hello Charles,
I noticed you posted a similar question here. do you have any further questions about using the call library function node?
Haley N
Applications Engineer
National Instruments
Maybe you are looking for
-
Help - My 5th Generation Ipod not recognised by ITunes but 1st Gen Ipod is!
Can anyone help? This is driving me mad! I recently purchased a 5th Generation 80gb Ipod. Before installing to my PC I downloaded the latest 7.2 version of ITunes together with quicktime. However whenever I plug my new Ipod in, nothing happens other
-
How can I complet a firmware update?
I have been trying to update my airport. It works fine with the two computers closest but only intermittently with the furthest and is getting worse. It connects reliably with the imac in the same room, the laptop in the nest room but rarely with the
-
How to Cancel Goods Receipt PO
Hi all, We selected the wrong vendor on a Goods Receipt PO. How can we cancel or reverse this transaction? Thanks, Jane
-
Is it possible to add a word doc (as a separate file) in Captivate?
This could help to satisfy 508 compliance. This is in addition to the closed captioning feature, which I plan to incorporate. FYI - I used Articulate Presenter in the past and was able to attach a Word Document, which user was able to access via link
-
Need help with navigation on E63
Hello I am new to this forum and i got a question about the navigation for my nokia e63. I bought the telephone and i saw it has navigation, but how do i access it? are there any maps installed? Is it like a route66/ tomtom or what so ever? What do