Finding BADI calls in ABAP Code
Hi Guys,
I want to find which program(s) call BADI Interface WORKORDER_UPDATE-INITIALIZE.
I've tried the where-used list without luck.
Also tried a break-point, but it doesn't stop.
PeteA
I did the same...
after double clicking
Program LCOBHU10
CLASS/INterfaces :
/SAPMP/CL_IM_CMTS Implementation Class for BAdI Impl. /SAPMP/CMTS
/SAPTRX/CL_IM_PP_WOUPDATE Imp. class for BAdI imp. /SAPTRX/PP_WOUPDATE
CL_EX_WORKORDER_UPDATE BAdI Class CL_EX_WORKORDER_UPDATE
CL_IM_PGTR_COMP Imp.Class for BAdI Imp. PGTR_COMP
it is strange due the fact yoa are using SAP 4.7 too (maybe different level of upgrades ?? )
Message was edited by: Jacek S³owikowski
Similar Messages
-
Java calls from ABAP code in XI
Java and ABAP gurus,
Is it possible to make java call from ABAP. Is a sample out there I can take a look at.
Please help.
Thanks.Hi,
YES, Very well it is Possible,
This will help you
/people/bv.pillai/blog/2006/09/28/calling-mdm-java-api-application-executable-from-abap
/people/vijayasarathy.raghunathan/blog/2005/12/28/java-editor-inside-abap
/people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
JCo Outbound( calling Java Function from ABAP )
/people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
Call Java Class and Methods from ABAP
Regards
Agasthuri Doss -
Problem in RFC call in ABAP code...Urgernt
Hi ,
I am working on scenario wherein , i have created remote enabled RFC in target system SAP R/3 one . I have maintained RFC in original system where i have my calling program.This done by using sm59 transaction .When i execute my abap calling program as follows , it gives out error as RFC destination not known.The code is
CALL FUNCTION 'ZRFC_01' DESTINATION 'IDECECC5'
EXPORTING nu1 = num1 nu2 = num2
IMPORTING res = result .
write: result .
This call passes two numbers for addition and returns result as addition in import parameters.
KIndly help me on thisHi,
First of all do not forget to add standard SAP exceptions to your code to avoid shotdumps in case there is something wrong with the RFC connection:
CALL FUNCTION 'ZXXX' DESTINATION 'ZXXX'
EXCEPTIONS
SYSTEM_FAILURE = 1
COMMUNICATION_FAILURE = 2.
Test your RFC connection in SM59 transaction. Make sure as well you did not make any typing errors, the best would be just copy its name from SM59 to your code. -
How to Zip a file and find it size using ABAP code
Hi All,
My requirement is to extract a file from Al11 ZIP it and find it size.
Please let me know whether there are any Function modules or Classes for Zipping and finding the size of it.
Note : Used Class "cl_abap_zip" but the output at in chinese language.
Thanks in advancve for your support.
Regards
JithuCheck https://wiki.sdn.sap.com/wiki/display/profile/GZIP
and how to zip and unzip a file in abap
May it useful
Kanagaraja L -
Custom Spell Check from ABAP Code without MS Word
Hi All,
I am working on a requirement where we need to check for misspelt words in a string that is received from another system. I have come across a number of FM's which can be used to check for spellings but all of the require MS Word to be installed in our PC, but I am looking for a solution that does not involve MS Word. If any of you have come across any external tool that can be called from ABAP code or any suggestion on a logic that can be built please pass it on. Any pointers or help in this regard would be highly appreciated.
Thanks,
PraveenHi,
Try the "CF_WWSpeller" customtag which actually uses the
Winword spelling engine,
http://web4w3.com/wwspeller.html -
Sample ABAP code for userexits, and calling bapi's
Hi,
Can someone please send me sample ABAP code
1) to do extractor enhancement using user exit.
2) ABAP program to call BAPI to read live cache order series data in SNP and write to Idocs through some ports.
3) ABAP routine to generate file name (based on date/country)in the infopackage to upload flatfiles.
Thank you very much in advance and appreciate any help.
Regards
Prasadhai ,
check this code...
*& Tables
tables : tstc, "SAP Transaction Codes
tadir, "Directory of Repository Objects
modsapt, "SAP Enhancements - Short Texts
modact, "Modifications
trdir, "System table TRDIR
tfdir, "Function Module
enlfdir, "Additional Attributes for Function Modules
tstct. "Transaction Code Texts
*& Variables
data : jtab like tadir occurs 0 with header line.
data : field1(30).
data : v_devclass like tadir-devclass.
*& Selection Screen Parameters
selection-screen begin of block a01 with frame title text-001.
selection-screen skip.
parameters : p_tcode like tstc-tcode obligatory.
selection-screen skip.
selection-screen end of block a01.
*& Start of main program
start-of-selection.
Validate Transaction Code
select single * from tstc
where tcode eq p_tcode.
Find Repository Objects for transaction code
if sy-subrc eq 0.
select single * from tadir
where pgmid = 'R3TR'
and object = 'PROG'
and obj_name = tstc-pgmna.
move : tadir-devclass to v_devclass.
if sy-subrc ne 0.
select single * from trdir
where name = tstc-pgmna.
if trdir-subc eq 'F'.
select single * from tfdir
where pname = tstc-pgmna.
select single * from enlfdir
where funcname = tfdir-funcname.
select single * from tadir
where pgmid = 'R3TR'
and object = 'FUGR'
and obj_name = enlfdir-area.
move : tadir-devclass to v_devclass.
endif.
endif.
Find SAP Modifactions
select * from tadir
into table jtab
where pgmid = 'R3TR'
and object = 'SMOD'
and devclass = v_devclass.
select single * from tstct
where sprsl eq sy-langu
and tcode eq p_tcode.
format color col_positive intensified off.
write:/(19) 'Transaction Code - ',
20(20) p_tcode,
45(50) tstct-ttext.
skip.
if not jtab[] is initial.
write:/(95) sy-uline.
format color col_heading intensified on.
write:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
write:/(95) sy-uline.
loop at jtab.
select single * from modsapt
where sprsl = sy-langu and
name = jtab-obj_name.
format color col_normal intensified off.
write:/1 sy-vline,
2 jtab-obj_name hotspot on,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
endloop.
write:/(95) sy-uline.
describe table jtab.
skip.
format color col_total intensified on.
write:/ 'No of Exits:' , sy-tfill.
else.
format color col_negative intensified on.
write:/(95) 'No User Exit exists'.
endif.
else.
format color col_negative intensified on.
write:/(95) 'Transaction Code Does Not Exist'.
endif.
Take the user to SMOD for the Exit that was selected.
at line-selection.
get cursor field field1.
check field1(4) eq 'JTAB'.
set parameter id 'MON' field sy-lisel+1(10).
call transaction 'SMOD' and skip first screen. -
How can I call a ABAP proxy class from BADI? PLease help
hi Experts,
I have a scenario where I have to call a ABAP proxy class from a BADI. How can I do this? Does anybody has sample code for the same?
Please help.
Thanks
GopalHi,
You can call a method of a class from BADI. Here are the steps.
1) In the BADI implementation create a object for the proxy class.
2) Call the Execute_Synchronous method.
You can define a BADI by using SE18 and you can implement it by using SE19.
Sample code...
================================================
METHOD ZIF_EX_VBADI~CONVERTUPPER.
DATA: OBJ TYPE REF TO ZTESTCLASS.
DATA: IT_DATA TYPE ZIN_MT,
IT_RES TYPE ZOUT_MT,
SEXCEPTION TYPE REF TO CX_AI_SYSTEM_FAULT.
TRY.
CREATE OBJECT OBJ
EXPORTING
LOGICAL_PORT_NAME = 'TESTPORT'.
CATCH CX_AI_SYSTEM_FAULT INTO SEXCEPTION.
ENDTRY.
ENDMETHOD.
================================================
Thanks,
Vivek LR -
Example of how to call a BadI from an Abap and use the NEW OO ALV Grid
Very easy to do.
<b>REPORT Z_BADI_TEST.
test call Badi from standard abap.
*Only from rel 6.40
do the following
1) define the Badi (SE18).
For Abap call test uncheck multiple use
and filter boxes
2) Implement the badi (SE19).
Add any methods here in the implementation
3) activate
4) define the standard class exithandler to the
Abap. This class is the "Badi caller
5) define an exit variable referring to your Badi
Implementation interface
this interface will normally be
called something like
ZIF_EX***************
You will see the actual name in SE18/SE19.
6) Instantiate your instance of the badi
via method call get_instance
7) Now call any method(s) in the Badi.
*****************start of abap code **************
Define the Badi calling class (standard sap class)
class cl_exithandler definition load. "Declaration
*Interface reference
data exit type ref to zif_ex__jimbotest.
data yes type c.
Used in Fmod call in Badi methods
data: v_knvv type knvv.
start-of-selection.
yes = ' '.
selection-screen begin of block b1.
parameters: r1 radiobutton group rad1,
r2 radiobutton group rad1,
r3 radiobutton group rad1.
selection-screen end of block b1.
parameters: p_kunnr type knvv-kunnr.
select single * into v_knvv
from knvv
where kunnr eq p_kunnr.
export v_knvv to memory id 'CUST6A'.
*Save customer data for the function module call
call method cl_exithandler=>get_instance
exporting
exit_name = 'Z_JIMBOTEST' "Your Badi Name
null_instance_accepted = yes
changing instance = exit.
if not exit is initial.
if r1 = 'X'.
call method exit->dispord . "Badi call
endif.
if r2 = 'X'.
call method exit->dispfakt. "Badi Call
endif.
if r3 = 'X'.
call method exit->dispmat. "Badi call
endif.
end of calling abap******** </b>
In the badi methods code as shown
1)
method ZIF_EX__JIMBOTEST~DISPORD.
CALL FUNCTION 'Z_DISPLAY_CUST'.
endmethod.
2)
method ZIF_EX__JIMBOTEST~DISPFAKT.
CALL FUNCTION 'Z_DISPLAY_FAKT'.
endmethod
3)
method ZIF_EX__JIMBOTEST~DISPMAT.
CALL FUNCTION 'Z_DISPLAY_CUST'.
endmethod.
Copy via SE 41 the status SALV_STANDARD from standard SAP program SALV_DEMO_METADATA into the main program where you've created the 3 function modules below (SAP______TOP)
Global Data for the three function modules I'm calling
FUNCTION-POOL Z_BADI_KNVV. "MESSAGE-ID ..
include <color>.
include <icon>.
include <symbol>.
tables: zknvv.
data: v_zzkvgr6 TYPE KNVV-ZZKVGR6.
data: choice1 type c.
data: choice2 type c.
data: choice3 type c.
data: choice4 Type c.
data: ok-code(5) type c.
data: answer type string.
data: value1 type SPOP-VARVALUE1.
data: answer1 type string.
tables: vbak, vbap, vakpa, vbrk, vrkpa.
data: lr_functions type ref to cl_salv_functions_list.
constants: gc_true type sap_bool value 'X',
gc_false type sap_bool value space.
add for colour displays
data: ls_color type lvc_s_colo.
DATA : LV_SALV_COLUMNS_TABLE TYPE REF TO CL_SALV_COLUMNS_TABLE.
data: lr_columns type ref to cl_salv_columns_table,
lr_column type ref to cl_salv_column_table.
Data:
gr_table TYPE REF TO cl_salv_table.
data: z_datum type sy-datum.
data: v_knvv type knvv.
data : begin of s_vbak,
vkorg type vakpa-vkorg,
vkgrp type vakpa-vkgrp,
vtweg type vakpa-vtweg,
spart type vakpa-spart,
auart type vakpa-auart,
vbeln type vakpa-vbeln,
bstnk type vakpa-bstnk,
audat type vakpa-audat,
netwr type vbak-netwr,
end of s_vbak.
data : begin of s_vbrk,
vbeln type vrkpa-vbeln,
vkorg type vrkpa-vkorg,
fkart type vrkpa-fkart,
fkdat type vrkpa-fkdat,
netwr type vbrk-netwr,
end of s_vbrk.
data: begin of s_vbap,
matnr type vbap-matnr,
arktx type vbap-arktx,
netwr type vbap-netwr,
kwmeng type vbap-kwmeng,
end of s_vbap.
data: t_vbap like table of s_vbap.
data: t_vbak
like table of s_vbak.
data: t_vbrk
like table of s_vbrk.
data: s_name type tabname.
data: gr_selections type ref to cl_salv_selections.
data: gr_events type ref to cl_salv_events_table.
Source code of the function modules.
Function modules themselves
FUNCTION Z_DISPLAY_CUST.
s_name = 'S_VBAK'.
orders in last 6 months
z_datum = sy-datum - 180.
import v_knvv from memory id 'CUST6A'.
get data
select avkorg aaudat avkgrp avtweg aspart aauart abstnk avbeln b~netwr
into corresponding fields of table t_vbak
up to 100 rows
from ( vakpa as a
inner join vbak as b
on avbeln eq bvbeln )
where a~kunde eq v_knvv-kunnr
and a~parvw eq 'AG'
and a~vkorg eq 'EN01'
and a~trvog eq '0'
and a~audat gt z_datum.
sort t_vbak by audat descending.
*data: gt_hyperlink type standard table of g_type_s_hyperlink.
Instead of if_salv_c_bool_sap=>false, you can pass the
value if_salv_c_bool_sap=>true to this method to
see your ALV as a list.
display data in Grid / List
TRY.
CALL METHOD cl_salv_table=>factory
EXPORTING
list_display = if_salv_c_bool_sap=>false
IMPORTING
r_salv_table = gr_table
CHANGING
t_table = t_vbak.
CATCH cx_salv_msg.
ENDTRY.
try.
LV_SALV_COLUMNS_TABLE = gr_table->get_columns( ).
lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'NETWR' ).
ls_color-col = col_negative.
ls_color-int = 0.
ls_color-inv = 0.
lr_column->set_color( ls_color ).
catch cx_salv_not_found.
endtry.
try.
lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'VBELN' ).
ls_color-col = col_negative.
ls_color-int = 1.
ls_color-inv = 1.
lr_column->set_color( ls_color ).
catch cx_salv_not_found.
endtry.
try.
*LV_SALV_COLUMNS_TABLE = gr_table->get_columns( ).
lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'NETWR' ).
lr_column->set_short_text( 'Short' ).
lr_column->set_medium_text( 'Medium' ).
lr_column->set_long_text( 'Net Value' ).
*lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'URL' ).
catch cx_salv_not_found.
endtry.
gr_table->set_screen_status( pfstatus = 'SALV_STANDARD'
report = sy-repid
set_functions = gr_table->c_functions_all ).
this statement actually does the display.
gr_table->display( ).
ENDFUNCTION.
FUNCTION Z_DISPLAY_FAKT.
s_name = 'S_VBRK'.
invoices in last 6 months
z_datum = sy-datum - 180.
import v_knvv from memory id 'CUST6A'.
get data
select avbeln afkart avkorg afkdat
b~netwr
into corresponding fields of table t_vbrk
up to 100 rows
from ( vrkpa as a
inner join vbrk as b
on avbeln eq bvbeln )
where a~kunde eq v_knvv-kunnr
and a~parvw eq 'RG'
and a~vkorg eq 'EN01'
and a~vbtyp eq 'M'
and a~fkdat gt z_datum.
sort t_vbrk by fkdat descending.
*data: gt_hyperlink type standard table of g_type_s_hyperlink.
Instead of if_salv_c_bool_sap=>false, you can pass the
value if_salv_c_bool_sap=>true to this method to
see your ALV as a list.
display data in Grid / List
TRY.
CALL METHOD cl_salv_table=>factory
EXPORTING
list_display = if_salv_c_bool_sap=>false
IMPORTING
r_salv_table = gr_table
CHANGING
t_table = t_vbrk.
CATCH cx_salv_msg.
ENDTRY.
try.
LV_SALV_COLUMNS_TABLE = gr_table->get_columns( ).
lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'NETWR' ).
ls_color-col = col_negative.
ls_color-int = 0.
ls_color-inv = 0.
lr_column->set_color( ls_color ).
catch cx_salv_not_found.
endtry.
try.
lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'VBELN' ).
ls_color-col = col_negative.
ls_color-int = 1.
ls_color-inv = 1.
lr_column->set_color( ls_color ).
catch cx_salv_not_found.
endtry.
try.
*LV_SALV_COLUMNS_TABLE = gr_table->get_columns( ).
lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'NETWR' ).
lr_column->set_short_text( 'Short' ).
lr_column->set_medium_text( 'Medium' ).
lr_column->set_long_text( 'Net Value' ).
*lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'URL' ).
catch cx_salv_not_found.
endtry.
gr_table->set_screen_status( pfstatus = 'SALV_STANDARD'
report = sy-repid
set_functions = gr_table->c_functions_all ).
this statement actually does the display.
gr_table->display( ).
ENDFUNCTION.
FUNCTION Z_DISPLAY_MATERIAL.
s_name = 'S_VBAP'.
invoicesrs in last 6 months
z_datum = sy-datum - 180.
import v_knvv from memory id 'CUST6A'.
get data
select avbeln bmatnr barktx bnetwr b~kwmeng
into corresponding fields of table t_vbap
up to 100 rows
from ( vakpa as a
inner join vbap as b
on avbeln eq bvbeln )
where a~kunde eq v_knvv-kunnr
and a~parvw eq 'AG'
and a~vkorg eq 'EN01'
and a~trvog eq '0'
and a~audat gt z_datum.
TRY.
CALL METHOD cl_salv_table=>factory
EXPORTING
list_display = if_salv_c_bool_sap=>false
IMPORTING
r_salv_table = gr_table
CHANGING
t_table = t_vbap.
CATCH cx_salv_msg.
ENDTRY.
try.
LV_SALV_COLUMNS_TABLE = gr_table->get_columns( ).
lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'NETWR' ).
ls_color-col = col_negative.
ls_color-int = 0.
ls_color-inv = 0.
lr_column->set_color( ls_color ).
catch cx_salv_not_found.
endtry.
try.
lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'ARKTX' ).
ls_color-col = col_negative.
ls_color-int = 1.
ls_color-inv = 1.
lr_column->set_color( ls_color ).
catch cx_salv_not_found.
endtry.
try.
*LV_SALV_COLUMNS_TABLE = gr_table->get_columns( ).
lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'NETWR' ).
lr_column->set_short_text( 'Short' ).
lr_column->set_medium_text( 'Medium' ).
lr_column->set_long_text( 'Net Value' ).
*lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'URL' ).
catch cx_salv_not_found.
endtry.
gr_table->set_screen_status( pfstatus = 'SALV_STANDARD'
report = sy-repid
set_functions = gr_table->c_functions_all ).
this statement actually does the display.
gr_table->display( ).
ENDFUNCTION.
You can extend this as far as you like -- it's really easy and MUCH MUCH easier than the old way with fieldcatalogs etc etc.If the pagecontainer_mc holds another movieclip that contains the button you are trying to target, then you need to include that loaded movieclip in the targeting. And if contacts is that movieclip, then you should be able to target it directly using...
var contacts:contatti = new contatti;
contacts.contacts_btn.addEventListener(MouseEvent.CLICK,showContacts); -
How to call a ABAP proxy class from a BADI? Please help!
hi Experts,
I have a scenario where I have to call a ABAP proxy class from a BADI. How can I do this? Does anybody has sample code for the same?
Please help.
Thanks
GopalHi Gopal,
Check this out
DATA: ref_obj TYPE REF TO zmfg_production_ord.----> BADI
* Instantiate the proxy class
CREATE OBJECT ref_obj.
TRY.
CALL METHOD ref_obj->execute_asynchronous
EXPORTING
output = it_output. "Output Structure
COMMIT WORK.
CATCH cx_ai_system_fault INTO ref_sysexception.
ENDTRY.
IF ref_sysexception IS INITIAL.
WRITE : / 'Error Message'.
ENDIF.
Edited by: Raj on May 28, 2008 4:52 PM -
Calling Java Services from ABAP code
Hi,
How to call Java services (not web service) from ABAP code?
I have a requirement where JAVA team has developed some services that can be called from URL or from a Java application.
Ex: when this URL is executed,
http://localhost:8080/artemis7_802/triton/mycompany.remoteFunctions.RequirementsList.a7x?requestid=3023&requestname=I6PRAO1&skill=SAP&skill=JAVA
It returns a XML file on browser.
And I have no idea about the 2nd way i.e. from Java application!
Now, how can ABAP call these java methods?
I heard that something can be done via maintaining RFC destinations in SM59 to call Java services? Can this be done with my requirement?
Please help.
Thanks and regards,
AmeyPosted it in WD ABAP forum.
-
How to call a transaction from ABAP code
Hi everybody,
How do I run a transaction from my ABAP code?
For example, through my ABAP code, I want to call the ME24 transaction (Maintain Purchase Order).
Thanks for the help,
RoyCALL TRANSACTION
Syntax
CALL TRANSACTION ta { [AND SKIP FIRST SCREEN]
| [USING bdc_tab [bdc_options]] }.
Extras:
1. ... AND SKIP FIRST SCREEN
2. ... USING bdc_tab [bdc_options]
Effect
The statement CALL TRANSACTION calls the transaction whose transaction code is contained in data object ta. The data object ta must be of character type and must contain the transaction code in uppercase letters. If the transaction specified in ta cannot be found, an untreatable exception is triggered. The additions suppress the display of the initial screen and allow you to execute the transaction using a batch input session.
At CALL TRANSACTION the calling program and its data is kept, and after exiting the called transaction, processing is resumed in the calling program after the call.
When the transaction is called, the ABAP program linked with the transaction code is loaded in a new internal session. The session of the calling program is kept. The called program runs in an SAP LUW of its own.
If the called transaction is a dialog transaction, after loading the ABAP program the event LOAD-OF-PROGRAM is triggered and the dynpro defined as initial dynpro of the transaction is called. The initial dynpro is the first dynpro of a dynpro sequence. The transaction is finished when the dynpro sequence is ended by encountering the next dynpro with dynpro number 0 or when the program is exited with the LEAVE PROGRAM statement.
If the called transaction is an OO transaction (as of release 6.10), when loading all programs except class pools the event LOAD-OF-PROGRAM is triggered and then the method linked with the transaction code is called. If the method is an instance method, implicitly an object of the corresponding class is generated and referenced by the runtime environment. The transaction is finished when the method is finished or when the program is exited using the LEAVE PROGRAM statement.
After the end of the transaction call, program execution of the calling program resumes after the CALL TRANSACTION statement.
Note
At the statement CALL TRANSACTION, the authorization of the current user to execute the called transaction is not checked automatically. If the calling program does not execute a check, the called program must check the authorization. To do this, the called program must call function module AUTHORITY_CHECK_TCODE.
Addition 1
... AND SKIP FIRST SCREEN
Effect
This addition suppresses the display of a screen of the initial dynpro of a called dialog transaction. The addition AND SKIP FIRST SCREEN suppresses the first screen under these prerequisites:
For the initial dynpro, in the Screen Painter the own dynpro number must not be specified as the next screen number.
All mandatory input fields of the initial dynpro must be filled completely and with the correct values by the SPA/GPA parameters
If these prerequisites are met, that screen of the dynpro is displayed that is specified in the Screen Painter as the next dynpro of the initial dynpro.
Example
If the static next dynpro of the initial dynpro of the called dialog transaction FLIGHT_TA is not the initial dynpro itself, its screen is suppressed, because its input fields are filled using the SPA/GPA parameters CAR and CON.
DATA: carrid TYPE spfli-carrid,
connid TYPE spfli-connid.
SET PARAMETER ID: 'CAR' FIELD carrid,
'CON' FIELD connid.
CALL TRANSACTION 'FLIGHT_TA' AND SKIP FIRST SCREEN.
Addition 2
... USING bdc_tab [bdc_options]
Effect
Use this addition to pass an internal table bdc_tab of row type BDCDATA from the ABAP Dictionary to a dialog transaction. The additions bdc_options control the batch input processing. When a transaction with addition USING is called, the system field sy-binpt is set to value "X" in the called program - while this transaction is running, no other transaction can be called with this addition.
The internal table bdc_tab is the program-internal representation of a batch input session and must be filled accordingly. The structure BDCDATA has the components shown in the table below.
Component Description
PROGRAM Name of the program of the called transaction
DYNPRO Number of the dynpro to be processed
DYNBEGIN Flag for the beginning of a new dynpro (possible values are "X" and " ")
FNAM Name of a dynpro field to be filled or batch input control statement, for example, to position the cursor
FVAL Value to be passed to the dynpro field or to the control statement
Using the internal table bdc_tab, you can provide any number of screens of the called transaction with input and user actions.
System Fields
sy-subrc Description
0 The batch input processing of the called transaction was successful.
< 1000 Error in the called transaction. If within the transaction a message was sent, you can receive it using the addition MESSAGES.
1001 Error in batch input processing.
Note
Outside of ABAP Objects you can specify the additions AND SKIP FIRST SCREEN and USING together. However, this does not make sense, because the addition AND SKIP FIRST SCREEN is desigend only to fill the mandatory input fields using SPA/GPA parameters, while the batch input table specified with USING controls the entire transaction flow including the display of the screens.
Example
Call of the Class Builder (transaction SE24) and display of class CL_SPFLI_PERSISTENT. The internal table bdcdata_tab contains the input for the batch input processing of the first dynpro (1000) of the transaction. Using structure opt, the batch input processing is set to suppress the first screen and to display the next screen in the standard size.
DATA class_name(30) TYPE c VALUE 'CL_SPFLI_PERSISTENT'.
DATA: bdcdata_wa TYPE bdcdata,
bdcdata_tab TYPE TABLE OF bdcdata.
DATA opt TYPE ctu_params.
CLEAR bdcdata_wa.
bdcdata_wa-program = 'SAPLSEOD'.
bdcdata_wa-dynpro = '1000'.
bdcdata_wa-dynbegin = 'X'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_CURSOR'.
bdcdata_wa-fval = 'SEOCLASS-CLSNAME'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'SEOCLASS-CLSNAME'.
bdcdata_wa-fval = class_name.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_OKCODE'.
bdcdata_wa-fval = '=CIDI'.
APPEND bdcdata_wa TO bdcdata_tab.
opt-dismode = 'E'.
opt-defsize = 'X'.
CALL TRANSACTION 'SE24' USING bdcdata_tab OPTIONS FROM opt. -
Call of BW queries from ABAP code
Has anybody information about how is it possible to call a BW query from ABAP code with parametrization (specifying characteristics) ? In our development project it's a crucial part, beacuse we have to provide interim function modules to carry out some conversion routine on BW provided data, before we put it on the screen embedded in a Visual composer Iview.
Have a look at this:
Calling BW queries programatically (also posted on BW forum)
Hope it helps.
Regards -
Help regarding calling BRFPLUS function through ABAP code
Hi,
I have a situation where I have to input data into a BRFPLUS function as a table (i.e the data is input as select options where list or range of data can be provided).The corresponding output is also in the form a table .I've created this function in BRFPLUS and is working fine .Now I have to call it through ABAP code.Can someone kindly provide me with the probable code for this scenario.
E.g:
ZT_MATNR is the table in brfplus representing the list of MATNR values input along with other such inputs to function module Z_FM
ZT_ATM is the resultant output table of the function which contains several fields.
Now I have to call this BRFPLUS function with help of ABAP code.Could someone kindly help.Hello ,
There should be a number of BRF+ tutorials available in SCN which discuss the FDT APIs. You can have a look at them to get an idea of the various APIs available and their uses.
For your usecase, you should do the following.
lo_fdt_function TYPE REF TO if_fdt_function,
lo_fdt_result TYPE REF TO if_fdt_result,
* Get function handle
CALL METHOD lo_fdt_factory->get_function
EXPORTING
iv_id = lv_function_id
RECEIVING
ro_function = lo_fdt_function.
where lv_function_id is the GUID of the BRF+ function . You can either make it a constant , or you can use a FDT API to get the function GUID from the BRF+ application name and function name.
* Set function context
TRY.
CALL METHOD lo_fdt_context->set_value
EXPORTING
iv_id =
ia_value =
This is one way to set the input context ( pass the input to the BRF+ function to process ). There are other ways to do this as well. Which one you use would depend on the kind of input you want to pass.
* Execute BRFPLUS function
TRY.
CALL METHOD lo_fdt_function->process
EXPORTING
io_context = lo_fdt_context
IMPORTING
eo_result = lo_fdt_result.
* Get result output
TRY.
CALL METHOD lo_fdt_result->get_value
IMPORTING
ea_value =
Another direct way of doing it would be to use the method PROCESS of the class CL_FDT_FUNCTION_PROCESS.
I have not gone into much explaination here , but it should provide you an idea of how you can go about it.Read the SCN docs on the APIs to get a better idea , or better still if you can get hold of a copy of the BRF+ book by Carsten Ziegler , you will get an end to end explaination of all BRF+ APIs in it.
Regards,
Indranil. -
How find the ABAP code with Error message
Hi
How to find the ABAP Code for Error Message?
Example:
Error Message: ZF026.
Regards
Odaiah Pelley
Edited by: Odaiah Pelley on Aug 22, 2008 4:21 AMHi
Excellent Answer, I appreciate it.
My question is with Error Message ZF026.
How to find ABAP Code ?
If I go for SE91 I will get same message as if I am getting error message.It is no use.
Regards
Odaiah Pelleyu -
How to find currently editing transaction code details using ABAP code
Hi,
if some user is using VA02 tcode.i want to know for which sales order(i.e Sales order number)he is making changes.
i want ABAP code sample for this scenario.
Cheers,
JagHi,
For this you need to create Lock Object from se11 .It will automatically crate Two Function modules for enque and deque.
In you case If you want to see the Details for Va02 use.
CALL FUNCTION 'ENQUEUE_EVVBAKE'
EXPORTING
VBELN = VBELN
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2.
CASE SY-SUBRC.
WHEN 1.
MESSAGE E042(V1) WITH vbeln RAISING ERROR_IN_COPY.
ENDCASE.
Regds,
Maybe you are looking for
-
i am unable to use GPS on my Nokia E65. can u please tell me how i can use GPS on my mobile fone. secondly tell me does it coast some thing
-
Can G5 1.8 dual mother board replace by a 2.5 dual
I've got a g5 2.5 dual mother replace to a 1.8 dual g5 tower, nothing happen except all the fans, did anyone know is it work, or my 2.5 mother board also dead?
-
How to make volume work in FaceTime
I tried using facetime on my mac tonite talking with my mom also using Facetime on her mac. The video feature worked but we couldn't figure out how to make the volume work. can someone help me?
-
MSC files won't save PerfMon changes
I created several .msc files with Performance Monitor snap-ins. Some of them save my PerfMon settings, but others won't. There are no error messages. The last modified date/time on the .msc file updates to the time I saved, but when I open the file a
-
ActiveX and IE using https and TLSv1
I'm starting with the ActiveX - Internet Explorer example found in C:\Program Files\National Instruments\LabVIEW 2009\examples\comm\ axevent.llb. In the Navigate2::URL parameter, I can type in the IP address of a device I'm trying to talk to and it