Calling 2 Z transactions in one Program
Hi Guru's,
I've a small requirement.
I've developed 2 different programs and 2 different T-Codes for those programs,
Now my requirement is i want to call those two Z t-codes in one program.
if i run one program, the program should execute the T-codes.
Please help me on this.
Thanks,
Adi.
Hi,
Find the below code.
Selection-screen begin of block b1.
Parameters:RB1 radiobutton group r1,
RB2 radiobutton group r1.
selection-screen end of block b1.
Start-of-selection.
If RB1 = 'X'.
Call Transaction TCODE1. "if call transaction
Submit Program Name1 Via Selection-Screen and Return. "if calling program
Clear RB1.
Elseif RB2 = 'X'.
Call Transaction TCODE2. "if call transaction
Submit Program Name2 Via Selection-Screen and Return. "if calling program
Clear RB2.
Endif.
Similar Messages
-
Three transactions in one program
Hi All,
How do I create 3 transactions for one program.
I have created one module pool program for employee details CREATION and I have one transaction for that.
Now I want to create Two more transaction for two functionalities DISPLAY and CHANGE.
Please tell me, how to implement this.
Thanks & Regards,
Nagaraju C.Hi Nagarju,
You can try this:
For all 3 requirements, make 3 screens: then for each of your screen , suppose for screen 1, Give 1 transaction name..similiarly for rest 2.
You can make 3 screens by putting screen group for 3 push buttons on the main screen and disable rest 2 one by one..
Hope it will help you,
Regards,
Nikita -
Caling WD Application from one program
Hi Experts,
How i can call the WD Application from one program without creating the TCODE for the WD application.
Thanks
Mahesh> I want to call the WD Application from a report without tcode.. Is it possible?
Hi Create a Push button In your report., On Click of button
call function call_browser
and pass your WDA url to this FM.,
else If you want to display in SAP GUI it self., use cl_gui_html_viewer class and disaply that url...
hope this helps u.,
Thanks & Regards,
Kiran -
Call two programs from one program.
HI all,
I have two BDC interface in seperate programs.
I want to call that two programs from one program based on a condition.
Is there any way.
I tried with call transaction 'SE38'.
set parameter ID but it is taking buffered value.
Thanks,
sriuse submit program to call other program.
SUBMIT prog|(field) [AND RETURN] [options].
also if you want BDC prog, then probably you can call the BDC recording using PERFORM bdc_prog (in program name).
PERFORM (<fsubr>)[IN PROGRAM (<fprog>)][USING ... <pi>... ]
[CHANGING... <pi>... ]
[IF FOUND].
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9dd035c111d1829f0000e829fbfe/content.htm -
Urgent!! How to call a custom transaction or an ABAP program in BSP?
Urgent!! How to call a custom transaction or an ABAP program in BSP?
We are pretty new on BSP. Would be very appreciated if any expert here give us the detailed steps on how to build up the application to just call a custom transaction (e.g., t-code: ztest) or an ABAP program. Would we have to create a button or event handler to do that? And the detailed steps?
Thanks in advance and we will definately give you reward points!hi Durairaj,
During the time to wait for your answer, we copied Bernd's code from your last link, but when activating it, get the 1st error msg:
Field "CLIENT" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. "DATA" statement."DATA" statement. The error shows up here:
<td>
<htmlb:inputField id = "client"
value = "<%= client %>" />
</td>
Then we added Client to the page attribute and define it as type String, then get another error:
The field "EVENT" is unknown, but there is a field with the similar name "EVENT_ID"."EVENT_ID". This error shows up at the beginning in the Event Handler:
OnInputProcessing:
code
event handler for checking and processing user input and
for defining navigation
event handler for data retrieval
event = cl_htmlb_manager=>get_event( runtime->server->request ).
IF event->name = 'button' AND event->event_type = 'click'.
button_event ?= event.
How to resolve this unknown Event error, need to define in Page Attribute tab? but with what type?
Actually we only want to run an ABAP4 program in BSP, the code is complicated, could you show us an easy way of doing this in BSP? -
How to call one program from another program
Hai,
How to call one program through another program.
Example.
I have two programs 1.ZPROG1 2. ZPROG2.
When i execute ZPROG1 at that time it should call ZPROG2.Hi ,
u can use submit statement to call a program .
DATA: text TYPE c LENGTH 10,
rspar_tab TYPE TABLE OF rsparams,
rspar_line LIKE LINE OF rspar_tab,
range_tab LIKE RANGE OF text,
range_line LIKE LINE OF range_tab.
rspar_line-selname = 'SELCRIT1'.
rspar_line-kind = 'S'.
rspar_line-sign = 'I'.
rspar_line-option = 'EQ'.
rspar_line-low = 'ABAP'.
APPEND rspar_line TO rspar_tab.
range_line-sign = 'E'.
range_line-option = 'EQ'.
range_line-low = 'H'.
APPEND range_line TO range_tab.
range_line-sign = 'E'.
range_line-option = 'EQ'.
range_line-low = 'K'.
APPEND range_line TO range_tab.
SUBMIT report1 USING SELECTION-SCREEN '1100'
WITH SELECTION-TABLE rspar_tab
WITH selcrit2 BETWEEN 'H' AND 'K'
WITH selcrit2 IN range_tab
AND RETURN.
regards,
Santosh thorat -
Can we call sceen of one program into another?
Hi ABAPers,
I wish to know whether, is it possible to call the screen of one program through another program? I know, calling a subroutine of a program from another is possible but i want to know whether calling screen of one program from another is possible or not?
Also if its possible then how?
Regards,
Sonu.Hi,
We can call the subscreens ...
CALL SUBSCREEN <area> INCLUDING [<prog>] <dynnr>.
The screen of a subscreen that you call is placed in the subscreen area <area> on the main screen.
If you do not specify a program <prog>, the system uses a screen from the current ABAP program. If you do specify a program <prog>, the system uses a screen from the program <prog> for the subscreen. This program is treated in the same way as an external subroutine call. In other words, it is loaded into the program group of the calling program, or, if it is a function group, as its own program group in the same internal session as the calling ABAP program.
Regards
Sudheer -
How can we call creen of one program from some other dynpro Program
Hi,
Is it possible to call a screen of one program from some other program as pop up or full scree.
please give you input if it is possible.
Thanks in advance.
Thanks and Regards,
Praveen.Hi,
But is there is any function module through we can call screen of some other program. PLease let me know if you are aware of that.
Thanks -
Calling a Transaction from a Program
Hi all.
I need to call transaction VT70 and VL71 from a Program and print the Output ZBOL and ZPCK resp.(ZBOL and ZPCK are ouput types)
So how to call TCODEs from Program and print them
Thanks in Advance,
BalajiHi,
Use call transaction statement to call the required transaction and pass the data to the transaction using SPA/GPA parameters.
parameter id can be taken from the dataelement from the dictionary.
Reward. -
Can a transaction be called in background dynamically using ABAP program??
Hi Experts,
Can a transaction be called in background dynamically using ABAP program without BDC???
Regards,
Mansi.u can create job dynamically through programming..Try this sample code..
data: jobname like tbtcjob-jobname value
' TRANSFER TRANSLATION'.
data: jobcount like tbtcjob-jobcount,
host like msxxlist-host.
data: begin of starttime.
include structure tbtcstrt.
data: end of starttime.
data: starttimeimmediate like btch0000-char1.
Job open
call function 'JOB_OPEN'
exporting
delanfrep = ' '
jobgroup = ' '
jobname = jobname
sdlstrtdt = sy-datum
sdlstrttm = sy-uzeit
importing
jobcount = jobcount
exceptions
cant_create_job = 01
invalid_job_data = 02
jobname_missing = 03.
if sy-subrc ne 0.
"error processing
endif.
Insert process into job
SUBMIT zreport and return << Here it is a static call but u can make it dynamic
with p_param1 = 'value'
with p_param2 = 'value'
user sy-uname
via job jobname
number jobcount.
if sy-subrc > 0.
"error processing
endif.
Close job
starttime-sdlstrtdt = sy-datum + 1.
starttime-sdlstrttm = '220000'.
call function 'JOB_CLOSE'
exporting
event_id = starttime-eventid
event_param = starttime-eventparm
event_periodic = starttime-periodic
jobcount = jobcount
jobname = jobname
laststrtdt = starttime-laststrtdt
laststrttm = starttime-laststrttm
prddays = 1
prdhours = 0
prdmins = 0
prdmonths = 0
prdweeks = 0
sdlstrtdt = starttime-sdlstrtdt
sdlstrttm = starttime-sdlstrttm
strtimmed = starttimeimmediate
targetsystem = host
exceptions
cant_start_immediate = 01
invalid_startdate = 02
jobname_missing = 03
job_close_failed = 04
job_nosteps = 05
job_notex = 06
lock_failed = 07
others = 99.
if sy-subrc eq 0.
"error processing
endif.
Regards,
JOy. -
Creating to BDC's in one program
Hi Experts,
Can we create two BDC's in one program.Hi Lokesh Reddy,
Ofcourse you can create more than 1 BDC in a single program
I have myself created 4 BDCs in single program.
Just remember to call the Transactions in correct order and also loop them properly, at times wrong looping messes up the BDC.
If you feel all transactions calling in 1 loop are confusing you, then u can club 2 transactions in 1 loop.
so that your 1st loop executes 2 transactions, once that loop is successfully over, the control moves onto the next loop, with same or different transactions. Dont worry the same data will be used by both the loops, as it'll be looping on the same internal table.
If your BDCs are not using same data, some are using 1st few columns, some the rest one
at such times wat u can do is take all data from flat file into 1 internal table and then individually move particular columns to another internal table.
then the BDCs that require data from 1st internal table, so loop at that internal table
the ones which need data from another internal table, so loop at the other internal table.
Please note as many recordings / BDCs u call those many number of time u have to write the statement.
CALL TRANSACTION.....
Like I wrote 4 BDCs in single program, I had to write CALL TRANSACTION 4 times.
Once u finish everything...put a break point and debug the whole program, u'll actually get to see the flow in which ur data is read, used by bdc, enters the data, how the control moves from 1 BDC to another, how the control goes from 1 LOOP to another, etc.
debug it in foreground 1st mode 'A', once u feel its going fine, then change it to background mode 'N'.
I hope this would help u All The Best.
Regards,
RadhikaS -
How to call a SM35 transaction and run in BDC report.
Hi Experts,
I knew that how to call a transaction but here, I've to call the SM35 transaction ,which have my BRS BDC recording, to run my session.
Pls help me how to call the transaction and run/process the first session tab in the table control of SM35 window.
thanks & regards
sankar.Hi,
Look up this example..here v have recorded one transaction & running it throough BDC report programming.
report ZBDC_16JUL2008
no standard page heading line-size 255.
include bdcrecx1.
DATA : BEGIN OF it_tab OCCURS 0,
LIFNR(016),
BUKRS(004),
KTOKK(004),
NAME1(035),
SORTL(010),
STRAS(035),
PFACH(010),
ORT01(035),
LAND1(003),
REGIO(003),
SPRAS(002),
TELF1(016),
AKONT(010),
FDGRV(010),
END OF it_tab.
start-of-selection.
CALL FUNCTION 'UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = 'D:\'
FILETYPE = 'ASC'
ITEM = ' '
FILEMASK_MASK = ' '
FILEMASK_TEXT = ' '
FILETYPE_NO_CHANGE = ' '
FILEMASK_ALL = ' '
FILETYPE_NO_SHOW = ' '
LINE_EXIT = ' '
USER_FORM = ' '
USER_PROG = ' '
SILENT = 'S'
IMPORTING
FILESIZE =
CANCEL =
ACT_FILENAME =
ACT_FILETYPE =
TABLES
data_tab = it_tab
EXCEPTIONS
CONVERSION_ERROR = 1
INVALID_TABLE_WIDTH = 2
INVALID_TYPE = 3
NO_BATCH = 4
UNKNOWN_ERROR = 5
GUI_REFUSE_FILETRANSFER = 6
OTHERS = 7
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
perform open_group.
LOOP at it_tab.
perform bdc_dynpro using 'SAPMF02K' '0105'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-KTOKK'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02K-LIFNR'
it_tab-LIFNR.
perform bdc_field using 'RF02K-BUKRS'
it_tab-BUKRS.
perform bdc_field using 'RF02K-KTOKK'
it_tab-KTOKK.
perform bdc_dynpro using 'SAPMF02K' '0110'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-TELF1'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFA1-NAME1'
it_tab-NAME1.
perform bdc_field using 'LFA1-SORTL'
it_tab-SORTL.
perform bdc_field using 'LFA1-STRAS'
it_tab-STRAS.
perform bdc_field using 'LFA1-PFACH'
it_tab-PFACH.
perform bdc_field using 'LFA1-ORT01'
it_tab-ORT01.
perform bdc_field using 'LFA1-LAND1'
it_tab-LAND1.
perform bdc_field using 'LFA1-REGIO'
it_tab-REGIO.
perform bdc_field using 'LFA1-SPRAS'
it_tab-SPRAS.
perform bdc_field using 'LFA1-TELF1'
it_tab-TELF1.
perform bdc_dynpro using 'SAPMF02K' '0120'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-VBUND'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0130'.
perform bdc_field using 'BDC_CURSOR'
'LFBK-BANKS(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPMF02K' '0210'.
perform bdc_field using 'BDC_CURSOR'
'LFB1-FDGRV'.
perform bdc_field using 'BDC_OKCODE'
'=UPDA'.
perform bdc_field using 'LFB1-AKONT'
it_tab-AKONT.
perform bdc_transaction using 'FK01'.
ENDLOOP.
perform close_group. -
Call an MM transaction without creating a new LUW
Hello Experts,
I have created a new Z_ transaction in which I want to call an existing Materials Management
transaction (MB1B). Additionally, in my transaction I update some extra custom (z_) tables. I would like to have one LUW so as to perform all updates (both custom tables and SAP tables updated by the MM transaction) together at the final "commit work" in my program.
Is there a way to call the MM transaction without creating a new LUW in my calling program (as the CALL TRANSACTION statement does)?
I have read that one way is to use the CALL DIALOG statement instead. Is it a safe method to use?
Please give as much detailed info (with examples) as possible.
Thank you very much in advance,
OrestisHi Sandra,
My requirement is to call a transacton in a subscreen. Created a screen 100 that is devided into 2 one for custom container to place tree control and another for subscreen that is to call transaction.
Call transaction works fine, but this transaction is being opened in new screen(as each transaction use new LUW)., is there any to display the transaction in the sub screen area instead of new screen..
For ex, very similar to t-code SE80. In se80, choose other object, and choose more, and select trasaction and enter any t-code, then it displays same of SE93 in the right side of the screen...hope it is clear..
Regards, Laks -
How to call a maintenance view from a program
Hello Abapers,
Can anybody explain with some examples. How to call a mainetenance view from a program.
Thanks
Ranjith.Use FM 'VIEW_MAINTENANCE_CALL'.
REPORT zmaintaintest.
VARIABLES / CONSTANTS
CONSTANTS:
c_action(1) TYPE c VALUE 'U', "Update
c_viewname TYPE tabname value 'ZEMP_EXAMPLE', "View Name
c_field(6) TYPE c VALUE 'EMPNO'. "Field Name
INTERNAL TABLES
DATA: itab_rangetab TYPE STANDARD TABLE OF vimsellist,
v_empno TYPE zempno,
wa_rangetab TYPE vimsellist.
SELECTION SCREEN
PARAMETERS: p_empno TYPE zempno OBLIGATORY. "Emplyee ID
AT SELECTION-SCREEN
AT SELECTION-SCREEN.
Chcking the existence of the user in EMPLOYEE table
PERFORM validate_employee.
START_OF_SELECTION
START-OF-SELECTION.
This will restrict the user view so that user can only view/change
Table data corresponding to his/her Employee ID
PERFORM define_limited_data_area.
Displaying table maintenance view for a particular employee ID
PERFORM call_view_maintenance.
*& Form validate_employee
Validate plant entered in the selection screen
FORM validate_employee.
SELECT SINGLE empno u201CEmployee ID
FROM zemp_example u201CEmployee Table
INTO v_empno
WHERE empno = p_empno.
IF sy-subrc <> 0.
MESSAGE 'Not an Valid User' TYPE 'I'.
ENDIF.
ENDFORM. "validate_employee
*& Form DEFINE_LIMITED_DATA_AREA
To restrict the user view so that user can see/change table data
corresponding to his employee ID. Here one internal table is
getting populated with field name as u201CEMPNOu201D (Key field of the table)
And value as given by user in Selection Screen and this is passed as
Parameter in function module 'VIEW_MAINTENANCE_CALL'
FORM define_limited_data_area.
CLEAR wa_rangetab.
wa_rangetab-viewfield = c_field.
wa_rangetab-operator = 'EQ'.
wa_rangetab-value = p_empno.
APPEND wa_rangetab TO itab_rangetab.
ENDFORM. "define_limited_data_area
*& Form CALL_VIEW_MAINTENANCE.
Displaying table maintenance view for a particular employee ID
FORM call_view_maintenance.
CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
EXPORTING
action = c_action
view_name = c_viewname
TABLES
dba_sellist = itab_rangetab.
ENDFORM. "call_view_maintenance
Regards,
Joy. -
How to call SAP Webservice in standalone java program
Hi,
In our Java application, we want to use the SAP Webservices. I dont know much about authentication mechanism used by SAP. Can any one please help me with any sample code how to Call SAP webservice in Standalone Jave Program. I searched alot on the web regarding this, but helpless. Please help me.
Thanks,
MohanHi Mohan,
You need an account for the ES Workplace. I'm afraid this is not free, e.g. check [SAP NetWeaver, Composition Subscription|https://www.sdn.sap.com/irj/sdn/subscriptions/composition].
But I thought you wanted to play with a WSDL [you already had at hand|Sample code to access BAPI Web services from JAVA required;?
Maybe you are looking for
-
ODBC--connection to 'SQL Serverservername' failed for one user but not another
In Win7, we're linking tables in an MS Access 2010 db to tables in a SQL Server 2008 R2 db. The driver user by the File dsn is SQL Server version 6.01.7601.17514 & we're using SQL Server Authentication. For some reason, one user gets the msg "ODBC--c
-
Treetable componet drag and drop issue
hi I am using jdev 11.1.1.4. I have used treetable component. I have 100 records in table and tree has right scroll bar. I have implemented drag and drop operation on treetable. The problem is When I select one if node in treetable and try to drop it
-
When I sync my iPod Touch (7.1.1) via iTunes (11.2) I keep getting this error. I understand it means that files are locked. I am running Windows Vista. How do I find out which files are locked, either through iTunes or the command prompt (cmd)?
-
Need help Updating Records in a Report Region
We have created some javascript to check a drop down used in a report region. This is the way the report is supposed to work: The first time the user comes to this screen he will go down the list and select a value of '1' or '2' for col2. When col2 d
-
please respond !! I don't want Version 4.. how do I download older version that works ???