Pass PO Number from MIRO to BADI
Hi Experts,
I have activated BADI 'Invoice_update'. Im checking some condition in the 'CHANGE_AT_SAVE' method.
This BADI is activated when 'SAVE' is clicked in MIRO
I have to pass the 'PO Number' ie EBELN entered in MIRO, to BADI code to pass a query in BADI.
How can I pass the PO number to BADI.
Please Suggest?
Rajiv Ranjan
Hi Rajiv,
You will be able to find EBELN field, if you drill down the import parameter TI_RSEG_NEW (Invoice Document Item: New).
If the BAdI is triggered during SAVE, meaning if there is any active implementation for this BAdI, then you will get this EBELN inside the method; you dont need to pass it. You can use the value TI_RSEG_NEW-EBELN in the program.
if you debug the BAdI, you can ensure this.
Hope this helps.
Sajan Joseph.
Similar Messages
-
How to select data from a table by passing document number from another tab
How to select data from a table by passing document number from another table.
for eg:-
I want to display name, adres, region from ADRC table
by using field delivery document number
Kind Regards,
Shanbagavalli.SHi Shanbagavalli,
There are multiple solutions to this questions a few i will try to answer and then you can take the best required for your requirements.
**Consider that you have a Internal table having document number from other table..
SELECT NAME ADRES REGION FROM ADRC
INTO IT_ADRC
FOR ALL ENTRIES IN IT_DOC
WHERE DOCUMENT_NO = IT_DOC-DOCUMENT_NO.
**Consider that you have 1 document number then
SELECT NAME ADRES REGION FROM ADRC
INTO IT_ADRC
WHERE DOCUMENT_NO = W_DOCUMENT_NO.
Hope this solves your problem.
Regards,
Kunjal -
Creation of an RFC to pass notification number from IOMS into SAP.
hi sap,
i have a requirment to such as:
Creation of an RFC to pass notification number from IOMS into SAP. The RFC containing notification number must access notification details via transaction IW23.
Creation of an RFC to pass notification field specific information from SAP to IOMS. Upon accessing the notification inside SAP the following field information must be passed back to IOMS.
can you please help me out with the RFC which would be much helpful to me.
when i give the RFC then through the RFC the IOMS will pass the NOTIFICATION NUMBER. Based on the notication number i have to pass the data that belongs to that perticlar NUMBER.
your help is much aprreicated and thanks in advance.
regards,
laya.I dont know what is IOMS and what platform they are using.
If you want to access data from Non-SAP system or Insert from non SAP system, you need to develop remote enabled function modules, check for standard function modules.
Check package IWOC, for standard function modules.
Thanks and Regards, -
Reference number from MIRO not populated in PO History for IR document
Hi SAP Gurus,
We are on ECC 5.0
I have posted invoices through MIRO with the Reference field populated. When I go back to transaction ME23N and display the PO history, I expect to see the Reference number from MIRO for the invoice receipt document, but it shows as blank.
Does anyone know how this gets populated and if we're missing any config settings?
Thanks,
LindaMake this flag for Account assignment category in the customization
SPRO -> Materials Managment -> Purchasing -> Account assignment -> Maintain A/c assignment category.
Select the relevent a/c assignment category and click on details button.
For PO with no account assignment
Make this flag for Account assignment category in the customization
SPRO -> Materials Managment -> Purchasing -> define external representation of Item category
If here the Invoice receipt indicator is not checked then you want see the IR document at PO history -
How to pass version number from source location to records center?
When designing our record management approach, one of the requirements from business is to pass the version number from the source location to records center. They need to know which version has been declared as a record for the same document.
Is there a way to implement this (OOB)? Thank you.Hi,
Based on your description, my understanding is that when you sent a document to records center, you want to pass version number from source location to records center.
When a document is sent to the records Center, we keep its version number as assigned in its original document library as metadata that is submitted along with the document to the Records Center (in the “Properties” sub-folder of the document library in
the Records Center).
Automatically synchronizing that version number directly into the versioning system in the Records Center is something we should probably consider for a future version, but even in the current version we definitely don’t lose that information.
Hope this helps clarify.
Refer to the following article:
http://blogs.msdn.com/b/recman/archive/2006/08/24/715883.aspx
Best Regards,
Lisa Chen
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Pass batch number from ECC system to GTS
Hi Experts,
I want to pass material batch number(MSEG-CHARG) to GTS system while creating the material document(GR) in ECC system. This batch number should be displayed in item level at custom declaration screen and should be stored at table /SAPSLL/CUSWLM.
Could you please help me how to do this? actually at ECC side i m not getting the api where i can pass batch number. also at gts how to retrieve the same even if we able to pass the same from ECC
Many Thanks,
Prafull.Hi,
i suggest you to have a closer look at the BAdI for Mapping and Enrichment of Data from Material Documents (MM0C) on ERP site and also at BAdI for Mapping External Data to Customs Declaration.
You will find them by following thes paths in the IMG:
In your SAP GTS System:
-SAP Customizing Implementation Guide
--SAP Global Trade Services
---SAP Customs Management
Business Add-Ins for SAP Customs Management
Copy External Data to Customs Declarations and Customs Shipments
BAdI for Mapping External Data to Customs Declaration
In your SAP ERP (feeder) System:
-SAP Customizing Implementation Guide
--Sales and Distribution
---Foreign Trade/Customs
SAP Global Trade Services - Plug-In
Change and Supplement Document Data for Transfer
BAdI for Mapping and Enrichment of Data from Material Documents (MM0C)
To display the (external data) Batch number on the User Interface on the customs declaration document,
you must implement BAdI for UI Control When Connecting External Applications to CD/CS
regards,
Ralf -
Reference from MIRO not copied to PO History
Hi SAP Gurus,
We are on ECC 5.0
I have posted invoices through MIRO with the Reference field populated. When I go back to transaction ME23N and display the PO history, I expect to see the Reference number from MIRO for the invoice receipt document, but it shows as blank.
Does anyone know how this gets populated and if we're missing any config settings?
Thanks,
LindaHi,
Good afternoon and greetings,
Please go through the following SAP OSS note
Note 376531 - MIRO: Field ZUONR is not ready for input
Please reward points if found useful
Thanking you
With kindest regards
Ramesh Padmanabhan -
How to pass serial number read from a PCB.
Hi,
I have a question:
How do I pass serial number read from a PCB so it will be embedded in Test Report file name for that test sequence. I am running Sequence in “New Execution" - Single Pass.
My test report file after I run test does not have serial number: “TEST_Rev6_Report[NO_UUT_SERIAL_NUM0][2 32 24 PM][4 26 2013].xml” but my Report Header has serial number present.
Thank you,
HenryThe attached screenshot shows how to set your report options, make sure you have the <TestSocket> and <UUTStatus> macros included in the Report File Path otherwise the serial will not be filled in the filename (Generate path is called a second time from the Single Pass -- Test Socket Entry Point sequence).
I used the ParallelModel.seq to test it.
The attached sequence file shows how to set the serial number.
Search for "Specifying Report File Paths by Expression" in the help for more macros.
Attachments:
Sequence File 2.seq 5 KB
Screenshot.png 57 KB -
RBKP and BKPF table update from MIRO
Hi All,
I am using the BADI BADI_FDCB_SUBBAS01 to add a custom field in MIRO transaction. The added custom field is getting updated in RBKP transaction.
I also want to update the custom field data in BKPF table, but i dont know when the BKPF table gets updated in MIRO transaction.
Can you help me where the BKPF table will get updated. Is there any BADI for updating the custom fields in table BKPF via MIRO?
Thanks and Regards,
VijayHi Baskar,
I have done this thing from MIRO transaction to update BKPF table. Please check the below code.
METHOD if_ex_badi_fdcb_subbas01~put_data_to_screen_object.
CONSTANTS:
c_bkpf_xref1(25) TYPE c VALUE '(SAPLFDCB)BKPF-XREF1_HD'.
FIELD-SYMBOLS: <fs_bkpf_xref1> TYPE ANY.
fill interface attributes from importing paramters
me->if_ex_badi_fdcb_subbas01~invfo = im_invfo.
ASSIGN (c_bkpf_xref1) TO <fs_bkpf_xref1>.
IF sy-subrc = 0.
<fs_bkpf_xref1> = me->if_ex_badi_fdcb_subbas01~invfo-zlet_number.
ENDIF.
ENDMETHOD.
METHOD if_ex_badi_fdcb_subbas01~get_data_from_screen_object.
CONSTANTS:
c_bkpf_xref1(25) TYPE c VALUE '(SAPLFDCB)BKPF-XREF1_HD'.
FIELD-SYMBOLS: <fs_bkpf_xref1> TYPE ANY.
fill export parameters from interface attributes
ex_invfo = me->if_ex_badi_fdcb_subbas01~invfo.
ASSIGN (c_bkpf_xref1) TO <fs_bkpf_xref1>.
if sy-subrc = 0.
<fs_bkpf_xref1> = ex_invfo-zlet_number.
endif.
ENDMETHOD.
After passing the data through field symbols, then you need to update the BKPF table using the BADI AC_DOCUMENT. Refer the below code.
METHOD if_ex_ac_document~change_after_check.
variable declaration
DATA: lv_let_number TYPE zisr_let_number,
lv_field TYPE char18 VALUE '(SAPLMRMP)xaccit[]',
lv_let_field TYPE char27 VALUE '(SAPLMR1M)RBKPV-ZLET_NUMBER'.
Field symbol declaration
FIELD-SYMBOLS : <ft_accit> TYPE accit_t,
<fs_accit> TYPE accit,
<fv_let_number> TYPE ANY.
Constant declaration
CONSTANTS : lc_miro TYPE sytcode VALUE 'MIRO'.
Check for transaction code MIRO
IF sy-tcode EQ lc_miro.
ASSIGN (lv_field) TO <ft_accit>.
CHECK sy-subrc EQ 0.
ASSIGN (lv_let_field) TO <fv_let_number>.
CHECK sy-subrc EQ 0.
Assign the letter number to BKPF table field XREF1_HD
LOOP AT <ft_accit> ASSIGNING <fs_accit>.
lv_let_number = <fv_let_number>.
<fs_accit>-xref1_hd = lv_let_number.
ENDLOOP.
ENDIF.
ENDMETHOD. -
How to find BADI Defination and Implemantation from Method of BADI?
HI,
can anyone tell me that how to find BADI Defination and Implemantation from Method of BADI?& Report ZPJA_PM002 (V2) &
& Text Elements: &
& P_DEVC Show user-exits from development class &
& P_LIMIT Limit submit program selection &
& P_FUNC Show function modules &
& P_SUBM Show submit programs &
& S01 Selection data (TCode takes precedence over program name) &
report zpja_pm002
no standard page heading
line-size 158.
*tables: enlfdir. "Additional Attributes for Function Modules
data: tabix like sy-tabix,
w_linnum type i,
w_off type i,
w_index like sy-tabix,
w_include like trdir-name,
w_prog like trdir-name,
w_incl like trdir-name,
w_area like rs38l-area,
w_level,
w_str(50) type c,
w_funcname like tfdir-funcname.
constants: c_fmod(40) type c value 'Function modules selected: ',
c_subm(40) type c value 'Submit programs selected: ',
c_col1(12) type c value 'Enhanmt Type',
c_col2(40) type c value 'Enhancement',
c_col3(30) type c value 'Program/Include',
c_col4(20) type c value 'Enhancement Name',
c_col5(40) type c value 'Enhancement Description'.
Work Areas: ABAP Workbench
data: begin of wa_d010inc.
data: master type d010inc-master.
data: end of wa_d010inc.
data: begin of wa_tfdir.
data: funcname type tfdir-funcname,
pname type tfdir-pname,
include type tfdir-include.
data: end of wa_tfdir.
data: begin of wa_tadir.
data: devclass type tadir-devclass.
data: end of wa_tadir.
data: begin of wa_tstc.
data: pgmna type tstc-pgmna.
data: end of wa_tstc.
data: begin of wa_tstcp.
data: param type tstcp-param.
data: end of wa_tstcp.
data: begin of wa_enlfdir.
data: area type enlfdir-area.
data: end of wa_enlfdir.
Work Areas: BADIs
data: begin of wa_sxs_attr.
data: exit_name type sxs_attr-exit_name.
data: end of wa_sxs_attr.
data: begin of wa_sxs_attrt.
data: text type sxs_attrt-text.
data: end of wa_sxs_attrt.
Work Areas: Enhancements
data: begin of wa_modsap.
data: member type modsap-member.
data: end of wa_modsap.
data: begin of wa_modsapa.
data: name type modsapa-name.
data: end of wa_modsapa.
data: begin of wa_modsapt.
data: modtext type modsapt-modtext.
data: end of wa_modsapt.
Work Areas: Business Transaction Events
data: begin of wa_tbe01t.
data: text1 type tbe01t-text1.
data: end of wa_tbe01t.
data: begin of wa_tps01t.
data: text1 type tps01t-text1.
data: end of wa_tps01t.
user-exits
types: begin of t_userexit,
type(12) type c,
pname like trdir-name,
txt(300),
level type c,
modname(30) type c,
modtext(40) type c,
end of t_userexit.
data: i_userexit type standard table of t_userexit with header line.
Function module developmnet classes
types: begin of t_devclass,
clas like trdir-clas,
end of t_devclass.
data: i_devclass type standard table of t_devclass with header line.
Submit programs
types: begin of t_submit,
pname like trdir-name,
level,
done,
end of t_submit.
data: i_submit type standard table of t_submit with header line.
Source code
types: begin of t_sourcetab, "#EC * (SLIN lügt!)
line(200), "#EC * (SLIN lügt!)
end of t_sourcetab. "#EC * (SLIN lügt!)
data: sourcetab type standard table of t_sourcetab with header line.
data c_overflow(30000) type c.
Description of an ABAP/4 source analysis token
data: i_stoken type standard table of stokex with header line.
data wa_stoken like i_stoken.
Description of an ABAP/4 source analysis statement
data: i_sstmnt type standard table of sstmnt with header line."#EC
keywords for searching ABAP code
types: begin of t_keywords,
word(30),
end of t_keywords.
data: keywords type standard table of t_keywords with header line.
function modules within program
types: begin of t_fmodule,
name like rs38l-name,
pname like trdir-name,
pname2 like trdir-name,
level,
bapi,
done,
end of t_fmodule.
data: i_fmodule type standard table of t_fmodule with header line.
& Selection Options &
selection-screen begin of block selscr1 with frame title text-s01.
parameter: p_pname like trdir-name memory id rid,
p_tcode like syst-tcode,
p_limit(4) type n default 100,
p_devc like rihea-dy_ofn default ' ',
p_func like rihea-dy_ofn default ' ',
p_subm like rihea-dy_ofn default ' '.
selection-screen end of block selscr1.
& START-OF-SELECTION &
start-of-selection.
if p_pname is initial and p_tcode is initial.
message e008(hrfpm). "Make entry on the selection screen
stop.
endif.
ensure P_LIMIT is not zero.
if p_limit = 0.
p_limit = 1.
endif.
perform data_select.
perform get_submit_data.
perform get_fm_data.
perform get_additional_data.
perform data_display.
& Form DATA_SELECT &
form data_select.
data selection message to sap gui
call function 'SAPGUI_PROGRESS_INDICATOR'
destination 'SAPGUI'
keeping logical unit of work
exporting
text = 'Get programs/includes' "#EC NOTEXT
exceptions
system_failure
communication_failure
. "#EC *
determine search words
keywords-word = 'CALL'.
append keywords.
keywords-word = 'FORM'.
append keywords.
keywords-word = 'PERFORM'.
append keywords.
keywords-word = 'SUBMIT'.
append keywords.
keywords-word = 'INCLUDE'.
append keywords.
if not p_tcode is initial.
get program name from TCode
select single pgmna from tstc into wa_tstc-pgmna
where tcode eq p_tcode.
if not wa_tstc-pgmna is initial.
p_pname = wa_tstc-pgmna.
TCode does not include program name, but does have refereve TCode
else.
select single param from tstcp into wa_tstcp-param
where tcode eq p_tcode.
if sy-subrc = 0.
check wa_tstcp-param(1) = '/'.
check wa_tstcp-param+1(1) = '*'.
if wa_tstcp-param ca ' '.
endif.
w_off = sy-fdpos + 1.
subtract 2 from sy-fdpos.
if sy-fdpos gt 0.
p_tcode = wa_tstcp-param+2(sy-fdpos).
endif.
select single pgmna from tstc into wa_tstc-pgmna
where tcode eq p_tcode.
p_pname = wa_tstc-pgmna.
if sy-subrc <> 0.
message e110(/saptrx/asc) with 'No program found for: '
p_tcode."#EC NOTEXT
stop.
endif.
else.
message e110(/saptrx/asc) with 'No program found for: ' p_tcode.
"#EC NOTEXT
stop.
endif.
endif.
endif.
Call customer-function aus Program coding
read report p_pname into sourcetab.
if sy-subrc > 0.
message e017(enhancement) with p_pname raising no_program."#EC *
endif.
scan abap-source sourcetab tokens into i_stoken
statements into i_sstmnt
keywords from keywords
overflow into c_overflow
with includes.
WITH ANALYSIS.
if sy-subrc > 0. "keine/syntakt. falsche Ablauflog./Fehler im Skanner
message e130(enhancement) raising syntax_error. "#EC *
endif.
check I_STOKEN for entries
clear w_linnum.
describe table i_stoken lines w_linnum.
if w_linnum gt 0.
w_level = '0'.
w_prog = ''.
w_incl = ''.
perform data_search tables i_stoken using w_level w_prog w_incl.
endif.
endform. "DATA_SELECT
& Form GET_FM_DATA &
form get_fm_data.
data selection message to sap gui
call function 'SAPGUI_PROGRESS_INDICATOR'
destination 'SAPGUI'
keeping logical unit of work
exporting
text = 'Get function module data' "#EC NOTEXT
exceptions
system_failure
communication_failure
. "#EC *
Function module data
sort i_fmodule by name.
delete adjacent duplicates from i_fmodule comparing name.
loop at i_fmodule where done ne 'X'.
clear: i_stoken, i_sstmnt, sourcetab, wa_tfdir, w_include .
refresh: i_stoken, i_sstmnt, sourcetab.
clear wa_tfdir.
select single funcname pname include from tfdir into wa_tfdir
where funcname = i_fmodule-name.
check sy-subrc = 0.
call function 'FUNCTION_INCLUDE_SPLIT'
exporting
program = wa_tfdir-pname
importing
group = w_area.
concatenate 'L' w_area 'U' wa_tfdir-include into w_include.
i_fmodule-pname = w_include.
i_fmodule-pname2 = wa_tfdir-pname.
modify i_fmodule.
read report i_fmodule-pname into sourcetab.
if sy-subrc = 0.
scan abap-source sourcetab tokens into i_stoken
statements into i_sstmnt
keywords from keywords
with includes.
if sy-subrc > 0.
message e130(enhancement) raising syntax_error.
endif.
check i_stoken for entries
clear w_linnum.
describe table i_stoken lines w_linnum.
if w_linnum gt 0.
w_level = '1'.
w_prog = i_fmodule-pname2.
w_incl = i_fmodule-pname.
perform data_search tables i_stoken using w_level w_prog w_incl.
endif.
endif.
endloop.
if p_devc = 'X'.
loop at i_fmodule.
clear: wa_tadir, wa_enlfdir.
select single area from enlfdir into wa_enlfdir-area
where funcname = i_fmodule-name.
check not wa_enlfdir-area is initial.
select single devclass into wa_tadir-devclass
from tadir where pgmid = 'R3TR'
and object = 'FUGR'
and obj_name = wa_enlfdir-area.
check not wa_tadir-devclass is initial.
move wa_tadir-devclass to i_devclass-clas.
append i_devclass.
i_fmodule-done = 'X'.
modify i_fmodule.
endloop.
sort i_devclass.
delete adjacent duplicates from i_devclass.
endif.
endform. "GET_FM_DATA
& Form GET_SUBMIT_DATA &
form get_submit_data.
data selection message to sap gui
call function 'SAPGUI_PROGRESS_INDICATOR'
destination 'SAPGUI'
keeping logical unit of work
exporting
text = 'Get submit data' "#EC NOTEXT
exceptions
system_failure
communication_failure
. "#EC *
sort i_submit.
delete adjacent duplicates from i_submit comparing pname.
w_level = '0'.
loop at i_submit where done ne 'X'.
clear: i_stoken, i_sstmnt, sourcetab.
refresh: i_stoken, i_sstmnt, sourcetab.
read report i_submit-pname into sourcetab.
if sy-subrc = 0.
scan abap-source sourcetab tokens into i_stoken
statements into i_sstmnt
keywords from keywords
with includes.
if sy-subrc > 0.
message e130(enhancement) raising syntax_error.
continue.
endif.
check i_stoken for entries
clear w_linnum.
describe table i_stoken lines w_linnum.
if w_linnum gt 0.
w_prog = i_submit-pname.
w_incl = ''.
perform data_search tables i_stoken using w_level w_prog w_incl.
endif.
endif.
restrict number of submit program selected for processing
describe table i_submit lines w_linnum.
if w_linnum ge p_limit.
w_level = '1'.
endif.
i_submit-done = 'X'.
modify i_submit.
endloop.
endform. "GET_SUBMIT_DATA
& Form DATA_SEARCH &
form data_search tables p_stoken structure stoken
using p_level p_prog p_incl.
loop at p_stoken.
clear i_userexit.
tabix = sy-tabix + 1.
i_userexit-level = p_level.
if i_userexit-level = '0'.
if p_incl is initial.
i_userexit-pname = p_pname.
else.
concatenate p_pname '/' p_incl into i_userexit-pname.
endif.
else.
if p_incl is initial.
i_userexit-pname = p_prog.
else.
concatenate p_prog '/' p_incl into i_userexit-pname.
endif.
endif.
Include
if p_stoken-str eq 'INCLUDE'.
check p_level eq '0'. " do not perform for function modules
*(2nd pass)
w_index = sy-tabix + 1.
read table p_stoken index w_index into wa_stoken.
check not wa_stoken-str cs 'STRUCTURE'.
check not wa_stoken-str cs 'SYMBOL'.
read table i_submit with key pname = wa_stoken-str.
if sy-subrc <> 0.
i_submit-pname = wa_stoken-str.
i_submit-level = p_level.
append i_submit.
endif.
endif.
Enhancements
if p_stoken-str eq 'CUSTOMER-FUNCTION'.
clear w_funcname.
read table p_stoken index tabix.
translate p_stoken-str using ''' '.
condense p_stoken-str.
if p_prog is initial.
concatenate 'EXIT' p_pname p_stoken-str into w_funcname
separated by '_'.
else.
concatenate 'EXIT' p_prog p_stoken-str into w_funcname
separated by '_'.
endif.
select single member from modsap into wa_modsap-member
where member = w_funcname.
if sy-subrc = 0. " check for valid enhancement
i_userexit-type = 'Enhancement'.
i_userexit-txt = w_funcname.
append i_userexit.
else.
clear wa_d010inc.
select single master into wa_d010inc-master
from d010inc
where include = p_prog.
concatenate 'EXIT' wa_d010inc-master p_stoken-str into
w_funcname
separated by '_'.
i_userexit-type = 'Enhancement'.
i_userexit-txt = w_funcname.
endif.
endif.
BADIs
if p_stoken-str cs 'cl_exithandler='.
w_index = sy-tabix + 4.
read table p_stoken index w_index into wa_stoken.
i_userexit-txt = wa_stoken-str.
replace all occurrences of '''' in i_userexit-txt with space.
i_userexit-type = 'BADI'.
append i_userexit.
endif.
Business transaction events
if p_stoken-str cs 'OPEN_FI_PERFORM'.
i_userexit-type = 'BusTrEvent'.
i_userexit-txt = p_stoken-str.
replace all occurrences of '''' in i_userexit-txt with space.
i_userexit-modname = i_userexit-txt+16(8).
case i_userexit-txt+25(1).
when 'E'.
clear wa_tbe01t.
select single text1 into wa_tbe01t-text1 from tbe01t
where event = i_userexit-txt+16(8)
and spras = sy-langu.
if wa_tbe01t-text1 is initial.
i_userexit-modtext = ''. "#EC NOTEXT
else.
i_userexit-modtext = wa_tbe01t-text1.
endif.
i_userexit-modname+8 = '/P&S'. "#EC NOTEXT
when 'P'.
clear wa_tps01t.
select single text1 into wa_tps01t-text1 from tps01t
where procs = i_userexit-txt+16(8)
and spras = sy-langu.
i_userexit-modtext = wa_tps01t-text1.
i_userexit-modname+8 = '/Process'.
endcase.
append i_userexit.
endif.
Program exits
if p_stoken-str cs 'USEREXIT_'.
i_userexit-type = 'Program Exit'.
i_userexit-txt = p_stoken-str.
replace all occurrences of '''' in i_userexit-txt with space.
append i_userexit.
endif.
Submit programs
if p_stoken-str cs 'SUBMIT'.
check p_level eq '0'. " do not perform for function modules
*(2nd pass)
check not p_stoken-str cs '_'. " ensure not SUBMIT_XXX
w_index = sy-tabix + 1.
read table p_stoken index w_index into wa_stoken.
check not wa_stoken-str cs '_'. " ensure not SUBMIT_XXX
replace all occurrences of '''' in wa_stoken-str with space.
read table i_submit with key pname = wa_stoken-str.
if sy-subrc <> 0.
i_submit-pname = wa_stoken-str.
i_submit-level = p_level.
append i_submit.
endif.
endif.
Perform routines (which reference external programs)
if p_stoken-str cs 'PERFORM'.
check p_level eq '0'. " do not perform for function modules
*(2nd pass)
w_index = sy-tabix + 1.
read table p_stoken index w_index into wa_stoken.
if not wa_stoken-ovfl is initial.
w_off = wa_stoken-off1 + 10.
w_str = c_overflow+w_off(30).
find ')' in w_str match offset w_off.
w_off = w_off + 1.
wa_stoken-str = w_str(w_off).
endif.
check wa_stoken-str cs '('.
w_off = 0.
while sy-subrc = 0.
if wa_stoken-str+w_off(1) eq '('.
replace section offset w_off length 1 of wa_stoken-str with ''
replace all occurrences of ')' in wa_stoken-str with space.
read table i_submit with key pname = wa_stoken-str.
if sy-subrc <> 0.
i_submit-pname = wa_stoken-str.
append i_submit.
endif.
exit.
else.
replace section offset w_off length 1 of wa_stoken-str with ''
shift wa_stoken-str left deleting leading space.
endif.
endwhile.
endif.
Function modules
if p_stoken-str cs 'FUNCTION'.
clear i_fmodule.
check p_level eq '0'. " do not perform for function modules
*(2nd pass)
w_index = sy-tabix + 1.
read table p_stoken index w_index into wa_stoken.
if wa_stoken-str cs 'WF_'.
if wa_stoken-str cs 'IF_'.
break-point.
endif.
if wa_stoken-str cs 'BAPI'.
i_fmodule-bapi = 'X'.
endif.
replace first occurrence of '''' in wa_stoken-str with space.
replace first occurrence of '''' in wa_stoken-str with space.
if sy-subrc = 4. " didn't find 2nd quote (ie name truncated)
clear wa_tfdir.
concatenate wa_stoken-str '%' into wa_stoken-str.
select single funcname into wa_tfdir-funcname from tfdir
where funcname like wa_stoken-str.
if sy-subrc = 0.
i_fmodule-name = wa_tfdir-funcname.
else.
continue.
endif.
else.
i_fmodule-name = wa_stoken-str.
endif.
i_fmodule-level = p_level.
append i_fmodule.
endif.
endloop.
endform. "DATA_SEARCH
& Form GET_ADDITIONAL_DATA &
form get_additional_data.
data selection message to sap gui
call function 'SAPGUI_PROGRESS_INDICATOR'
destination 'SAPGUI'
keeping logical unit of work
exporting
text = 'Get additional data' "#EC NOTEXT
exceptions
system_failure
communication_failure
. "#EC *
loop at i_userexit.
Enhancement data
if i_userexit-type cs 'Enh'.
clear: wa_modsapa.
select single name into wa_modsapa-name from modsap
where member = i_userexit-txt.
check sy-subrc = 0.
i_userexit-modname = wa_modsapa-name.
clear wa_modsapt.
select single modtext into wa_modsapt-modtext from modsapt
where name = wa_modsapa-name
and sprsl = sy-langu.
i_userexit-modtext = wa_modsapt-modtext.
endif.
BADI data
if i_userexit-type eq 'BADI'.
clear wa_sxs_attr.
select single exit_name into wa_sxs_attr-exit_name from sxs_attr
where exit_name = i_userexit-txt.
if sy-subrc = 0.
i_userexit-modname = i_userexit-txt.
else.
i_userexit-modname = 'Dynamic call'. "#EC NOTEXT
endif.
clear wa_sxs_attrt.
select single text into wa_sxs_attrt-text from sxs_attrt
where exit_name =
wa_sxs_attr-exit_name
and sprsl = sy-langu.
i_userexit-modtext = wa_sxs_attrt-text.
endif.
modify i_userexit.
endloop.
get enhancements via program package
clear wa_tadir.
select single devclass into wa_tadir-devclass from tadir
where pgmid = 'R3TR'
and object = 'PROG'
and obj_name = p_pname.
if sy-subrc = 0.
clear: wa_modsapa, wa_modsapt.
select name from modsapa into wa_modsapa-name
where devclass = wa_tadir-devclass.
select single modtext from modsapt into wa_modsapt-modtext
where name = wa_modsapa-name
and sprsl = sy-langu.
read table i_userexit with key modname = wa_modsapa-name.
if sy-subrc <> 0.
i_userexit-modtext = wa_modsapt-modtext.
i_userexit-type = 'Enhancement'. "#EC NOTEXT
i_userexit-modname = wa_modsapa-name.
i_userexit-txt = 'Determined from program DevClass'."#EC NOTEXT
i_userexit-pname = 'Unknown'. "#EC NOTEXT
append i_userexit.
endif.
endselect.
endif.
endform. "GET_ADDITIONAL_DATA
& Form DATA_DISPLAY &
form data_display.
data selection message to sap gui
call function 'SAPGUI_PROGRESS_INDICATOR'
destination 'SAPGUI'
keeping logical unit of work
exporting
text = 'Prepare screen for display' "#EC NOTEXT
exceptions
system_failure
communication_failure
. "#EC *
sort i_userexit by type txt modname.
delete adjacent duplicates from i_userexit comparing txt modname.
format headings
write: 'Enhancements from main program'. "#EC NOTEXT
write: /.
uline.
format color col_heading.
write: / sy-vline,
(12) c_col1, "Enhanmt Type
sy-vline,
(40) c_col2, "Enhancement
sy-vline,
(30) c_col3, "Program/Include
sy-vline,
(20) c_col4, "Enhancement name
sy-vline,
(40) c_col5, "Enhancement description
sy-vline.
format reset.
uline.
format lines
loop at i_userexit.
set line colour
case i_userexit-type.
when 'Enhancement'.
format color 3 intensified off.
when 'BADI'.
format color 4 intensified off.
when 'BusTrEvent'.
format color 5 intensified off.
when 'Program Exit'.
format color 6 intensified off.
when others.
format reset.
endcase.
write: / sy-vline,
i_userexit-type,
sy-vline,
i_userexit-txt(40),
sy-vline,
i_userexit-pname(30),
sy-vline,
i_userexit-modname(20),
sy-vline,
i_userexit-modtext(40),
sy-vline.
endloop.
format reset.
uline.
user-exits from development class of function modules
if p_devc = 'X'.
write: /.
write: / 'User-exits from function module development class'."#EC
*NOTEXT
write: 157''.
uline (90).
write: 157''.
loop at i_devclass.
clear wa_modsapa.
select name from modsapa into wa_modsapa
where devclass = i_devclass-clas.
select single name modtext into corresponding fields of wa_modsapt
from modsapt
where name = wa_modsapa-name
and sprsl = sy-langu.
format color 3 intensified off.
write: / sy-vline,
(12) 'Enhancement',
sy-vline,
wa_modsapa-name,
sy-vline,
wa_modsapt-modtext,
sy-vline.
endselect.
endloop.
uline (90).
format reset.
endif.
describe table i_fmodule lines w_linnum.
write: / c_fmod , at 35 w_linnum. "#EC NOTEXT
write: 157''.
if p_func = 'X'.
display fuction modules used in program
uline (38).
write: 157''.
loop at i_fmodule.
write: sy-vline,
i_fmodule-name,
sy-vline,
i_fmodule-bapi,
sy-vline.
write: 157''.
endloop.
uline (38).
endif.
describe table i_submit lines w_linnum.
write: / c_subm , at 35 w_linnum. "#EC NOTEXT
write: 157''.
if p_subm = 'X'.
display submit programs used in program
uline (44).
write: 157''.
loop at i_submit.
write: sy-vline,
i_submit-pname,
sy-vline.
write: 157''.
endloop.
uline (44).
endif.
issue message with number of user-exits displayed
describe table i_userexit lines w_linnum.
message s697(56) with w_linnum.
endform. "DATA_DISPLAY
reward points if it helps
gunjan -
I have a confirmation number from American Airlines for a flight with my family all under my name and for some reason I cannot add all of our tickets to Passbook. To clarify, I went to the American Airlines app and put in the confirmation number along with my name which pulled up my boarding pass only. Although I was able to add this boarding pass to Passbook, I was not able to add any of the other boarding passes for my children to Passbook that should have also been under the flight reservation. In fact I couldn't even see them in the American Airlines app. I tried to use their names and the same confirmation number but nothing happened, and nothing else seems to be working. How can I add all of these boarding passes to my Passbook?
Fair enough.
I started doing this before unlimited data and emails on phones was a common commodity, on my Samsung Blackjack.
I then continued it due to its convenience. My only counter argument is this:
Even when emails are set to immediately push, I am always notified earlier by this forwarding message (sometimes by several minutes/hours due to the fact that it is not dependent on my being connected to 4G or wifi to receive it.
Also, to contradict snozdop's point that both methods use data and battery, I say this - when I use the forwarding method, the information comes in a pure text format and therefore uses considerably less information than an HTML and CSS rich email, with embedded images and such -also, unlimited text messages aids curve costs.
I will, however, give this method a go. In any case, a solution to my original question would still be greatly appreciated.
Thanks guys. -
Passing a structure from Java to PL/SQL Procedure
Environment: Oracle DB, Tomcat/Apache
How do we pass a structure (Table Record Type) from Java to a PL/SQL Stored Procedure?
We are doing JSP-->JavaClass/Bean to communicate to DB. We have an existing PL/SQL packages/Procedure to insert records into table (These procedures have record types as in/out parameters). So is there a way to call these from Java?
Thanks in advance.
RameshOracle9 i JDBC Developers Guide and Reference(page 21-16):
It is not feasible for Oracle JDBC drivers to support calling arguments or return
values of the PL/SQL RECORD, BOOLEAN, or table with non-scalar element types.
However, Oracle JDBC drivers support PL/SQL index-by table of scalar element
types. For a complete description of this, see "Accessing PL/SQL Index-by Tables"
on page 16-21.
As a workaround to PL/SQL RECORD, BOOLEAN, or non-scalar table types, create
wrapper procedures that handle the data as types supported by JDBC. For example,
to wrap a stored procedure that uses PL/SQL booleans, create a stored procedure
that takes a character or number from JDBC and passes it to the original procedure
as BOOLEAN or, for an output parameter, accepts a BOOLEAN argument from the
original procedure and passes it as a CHAR or NUMBER to JDBC. Similarly, to wrap a
stored procedure that uses PL/SQL records, create a stored procedure that handles
a record in its individual components (such as CHAR and NUMBER) or in a structured
object type. To wrap a stored procedure that uses PL/SQL tables, break the data
into components or perhaps use Oracle collection types. -
Pass a value from a PL/SQL function to a javascript (html header) ? ?
Hey Guys,
Have a question regarding how to pass a value from a PL/SQL function to a javascript in the HTML Header.
I have created a PL/SQL function in my database, which does looping.
The reason for this is: On my apex page when the user selects a code, it should display(or highlight buttons) the different project id's present for that particular code.
example= code 1
has project id's = 5, 6, 7
code 2
has project id's = 7,8
Thank you for your Help or Suggestions
Jesh
The PL/SQL function :
CREATE OR REPLACE FUNCTION contact_details(ACT_CODE1 IN NUMBER) RETURN VARCHAR2 IS
Project_codes varchar2(10);
CURSOR contact_cur IS
SELECT ACT_CODE,PROJECT_ID
FROM ACTASQ.ASQ_CONTACT where ACT_CODE = ACT_CODE1;
currec contact_cur%rowtype;
NAME: contact_details
PURPOSE:
REVISIONS:
Ver Date Author Description
1.0 6/25/2009 1. Created this function.
BEGIN
FOR currec in contact_cur LOOP
dbms_output.put_line(currec.PROJECT_ID || '|');
Project_codes := currec.PROJECT_ID|| '|' ||Project_codes;
END LOOP;
RETURN Project_codes;
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
WHEN OTHERS THEN
-- Consider logging the error and then re-raise
RAISE;
END contact_details;
/Jesh:
I have made the following modifications to your app to get it to work as I thing you need it to.
1) Changed the source for the HTML Buttons Region(note use of id vs name for the Buttons)
<script>
function hilitebtn(val) {
//gray buttons
$x('graduate').style.backgroundColor='gray'
$x('distance').style.backgroundColor='gray'
$x('career').style.backgroundColor='gray'
$x('photo').style.backgroundColor='gray'
//AJAX call to get project-ids
var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=GETPROJECTS',0);
get.addParam('x01',val)
gReturn = get.get();
var arr=gReturn.split(':'); //dump into array
get = null;
for (i=0;i<arr.length;i++) {
// alert('val=' + arr);
if ( arr[i]==5)
$x('graduate').style.backgroundColor='red';
if ( arr[i]==6)
$x('distance').style.backgroundColor='red';
if ( arr[i]==7)
$x('career').style.backgroundColor='red';
if ( arr[i]==8)
$x('photo').style.backgroundColor='red';
</script>
<table cellpadding='0' cellspacing='0' border='0'>
<tr><td>
<input type='button' id='graduate' value='Graduate'>
</td>
<td>
<input type='button' id='distance' value='Distance'>
</td>
<td>
<input type='button' id='career' value='Career/Tech'>
</td>
<td>
<input type='button' id='photo' value='Photos'>
</td>
</tr></table>
2) Defined the application process GETPROJECTS as DECLARE
IDS varchar2(1000);
l_act_code varchar2(100) :=4;
begin
IDS:='';
l_act_code := wwv_flow.g_x01;
for x in(
SELECT ACT_CODE,PROJECT_ID
FROM ASQ_CONTACT
where ACT_CODE = l_act_code)
LOOP
IDS := IDS || X.PROJECT_ID|| ':' ;
END LOOP;
HTP.PRN(IDS);
END;
3) Changed the 'onchange' event-handler on p1_act_code to be 'onchange=hilitebtn(this.value)'
4) Added the JS to the HTML Page Footer <script>
hilitebtn($v('P1_ACT_CODE'));
</SCRIPT> -
Passing a value from Report A to B when B is in a different Subject Area
I had posted a question previously on how to pass the Dept # from Report A to B when B i in a different Subject Area. The question was:
Report A is a table on the Dashboard that shows Actual vs Budget results by Department. I want the user to click on the Department and be navigated to report B that shows the detail transactions that make up the Actual results. Report A and B are from different underlying subject areas. Thus when I navigate to report B, I see ALL departments, and not the one I clicked on in Report A to bring up Report B. How can I limit the results in Report B to be just the respective cell I clicked on in Report A?
I got great advice from Nico on how to use the GO URL, but I can only get that to work if the 2 reports in question are from the same data model. In my case they are NOT.
The GO URL seems to be working, as it does open up Report B when I click on the Department field in Report A, but it does not pass the Department number to Report B, even though reprot B has that field "as prompted".
Can anyone definitively indicate whether what I'm trying to do is not possible in BI EE?Read this from Venkat... I think this will be helpful in understanding prompts, both the column prompts (Answers) type and the dashboard prompts. Very useful, I think.
http://oraclebizint.wordpress.com/2008/04/30/oracle-bi-ee-101332-understanding-dashboard-prompts-passing-prompts-to-multiple-subject-areas-aliases/ -
Passing a parameter from one form to another
Hi
I'm trying to pass a parameter from one form to another. I've read lots of postings about this, and I have succeeded in calling the second form using code behind one of the existing Portal buttons (insert). Here is the code:
DECLARE
pro_id NUMBER;
pro_link VARCHAR2(1200);
BEGIN
pro_id := p_session.get_value_as_number(
p_block_name => 'DEFAULT',
p_attribute_name => 'A_PRO_ID');
pro_link := portal30.wwv_user_utilities.get_url(
'CINTRA_APP.PRO_LINK_1',
'WKG_PRO_ID',pro_id,
'_WKG_PRO_ID_cond','=');
PORTAL30.wwa_app_module.set_target(pro_link,'CALL');
END;
Trouble is, the parameter does not get passed. This could be because:
the field I'm trying to populate is based on an LOV ?
the target form is not set up to receive parameters? (I read this somewhere, but how do you do it?)
Thanks
ManfredDear InoL
My Header Form coding as follows.
When I press the button to move to the lines the following code executes
PASSING FORM CODING;
DECLARE
pl PARAMLIST := GET_PARAMETER_LIST('PL_AT');
BEGIN
IF NOT ID_NULL(pl) THEN
DESTROY_PARAMETER_LIST(pl);
END IF;
pl := CREATE_PARAMETER_LIST('PL_AT');
ADD_PARAMETER(pl,'P_AT',TEXT_PARAMETER,:HWSI_ASSET_TAG);
CALL_FORM('E:\IT_SYSTEM\6i\HWDYNAMICINFO.FMX',NO_HIDE,DO_REPLACE,NO_QUERY_ONLY,PL);
END;
RECEIVING FORM CODING;
Written on WHEN_NEW_FORM_INSTANCE
BEGIN
IF :PARAMETER.P_AT IS NULL THEN
GO_ITEM('NZK_HW_DYNAMIC.OS_ASSET_TAG');
ENTER_QUERY;
ELSE
SET_BLOCK_PROPERTY('NZK_HWSTATIC_INFO',DEFAULT_WHERE,'HWSI_ASSET_TAG ='||:parameter.p_at);
SET_BLOCK_PROPERTY('NZK_HWSTATIC_INFO',DEFAULT_WHERE,'HWSI_ASSET_TAG ='||:parameter.p_at);
EXECUTE_QUERY;
GO_ITEM('NZK_HW_DYNAMIC.OS_ASSET_TAG');
END IF;
END;
Created PARAMETER as P_AT, Data Type CHAR, MAX LENGTH 30
Thank you
NZK
Maybe you are looking for
-
Hi guyes, We have uploaded the data while go-live with some cost element for batch costing i.e. Labour, power, Fuel cost per kg. Now we want to change this cost, pl guide me on the procedure to follow or will it be automatically get updated by some p
-
I can't print web downloads, specifically pdf files, with Firefox.
I get an error message if I try and look at the page in print preview which says: " Couldn't open the file. It may be corrupt or a file format that Preview doesn't recognize. " I can print the same pages in Safari. The only remedy I can see so far is
-
Querying items in folder doesn't work in SharePoint 2013 (Cloud)
Hi, I have 2 folders in a SharePoint List. Every folder contains 2555 items. There is only one column "Title" . I have indexed the "Title" column. The title field contains same values as "Hello" for each and every record. I am querying the first fol
-
Interactive PDFs: Video and Type?
Hi, I'm trying to create an interactive PDF where the first page has an animation and a title. In Indesign CS5.5, I've placed a .mov (also tried.flv) in the background, behind some live type. What I was hoping is that it would export just like that,
-
Ipod can't open...
hi everyone, My ipod app on iphone doesnt open, when i click on the icon, i've got a white screen, then 30 seconds later, desappears and nothing else... I just updated my device, but no change... Any solution? Thanks, .:m0r0r@69:.