Enhance sorce code in Function module option
Dear Expets ,
Please let me the advantage of the button - enhance source code in the menu bar of the standard function module.
Can i write my own logic there .
I am planning to modify the function module - CK_F_INTERNAL_ACTIVITY_VAL - based on certain condition.
Thanks,
Dev
Hi,
The option mentioned is a part of the enhancement framework provided by SAP to write Implict enhancements
Search for Keyword "Implict enhancements" in SDN and elsewhere to get a brief idea
Using this we can write codes in specific areas of the code as indicated by SAP.
To view these locations -> click on the " enhance source code " button and then go to EDIT->Enhancement Operations -> show Implicit Enhancements ...SAP will highlight the areas where code can be written.
Right Click on the area required->Enhancement Impelemtation -> Create
It asks for a "Enhancement Implementation" as a table control pop-up -> Creata a new one using the "create Icon" and give a suitable name .Your enhancement code will be save under this.
In case you plan to undo the changes,go to the spot created Right Click ->Enhancement Impelemtation -> Undo
Always use the "Where -used list" to analyse the impact of the changes when the function module code is changed and use this "Implict enhancement" only as the last option to edit source code.Implicit options may not always be available for all source codes and at all locations desired.
Hope it helps!
Regards
Byju
Similar Messages
-
ALV sorce codes and function modules
Hi Experts,
Can anyone please send me the ALV source codes,the various fuction modules used in it.
Regards,
Narreshalv is abap list viewer where in u can eliminate the pain of writing the source code
for all manipulations of data on the list.
u have all predifned sort of keys where u can manipulate by using those buttons....
also u can display the list in grid format...
have a look at the most commonly used alv's in these sites..
http://help.sap.com/saphelp_nw04/helpdata/en/66/bc7aab43c211d182b30000e829fbfe/frameset.htm
http://esnips.com/doc/ad20dca9-6182-4903-8d8f-96a66dc8590c/ALV.pdf
hope this helps u...
with regards,
sampath
*award all helpful answers -
Implicit enhancement to a standard function module.
Hi everybody.
I used an Implicit Enhancement to a Standard function module Customized_Message, at the starting of function module.
Code:
ENHANCEMENT 1 ZFK01_ENHANCEMENT4. "active version
If sy-tcode = 'FK01' and sy-CPROG = 'SAPMF02K' AND I_MSGNR = '230' AND i_arbgb = 'F2' AND I_DTYPE = 'I'.
EXIT.
ENDIF.
ENDENHANCEMENT.
The above is working fine, to the condition what i had given above code.
But my question is, can i use a implicit enchancement to a Standard function module(Customized_message).Yes, but you should also be aware that 'F2' is a configurable message class in the IMG. You should attempt to solve your issue in that manner first.
-
Assigning of process code to function module
hi all,
please let me know where to go for assigning teh process code to function module. i am unable to get the function module from the process code(we42). please let me know
thank you
chanIn WE42 itself we can assign the process code to a FM.
select new entries.
Enter a process code name & description.
Enter Ur FM in Identification Field.
Now select Processing by Function module in Processing type.
Save it.
For outbound do the same thing in WE41 tcode -
Hi
I have created a report and it gets displayed in ALV. My requirement was to put the whole code in a function module, including the ALV functionality...I have put the same..the problem is that I am not able to see the TOP-OF-PAGE..
I am putting a sample code of what exactly I did in the function module..let me know what needs to be done..
FUNCTION ZAZTEST.
""Local Interface:
*" IMPORTING
*" REFERENCE(GV_REPID) TYPE SY-REPID
*" TABLES
*" S_KUNNR STRUCTURE JITO_KUNNR_RANGE
perform sub_get_customers tables s_kunnr
changing gt_kna1.
perform sub_prepare_fieldcatalog using :
'KUNNR' 'Customer No' '10' 'GT_KNA1' space space changing gt_fieldcat,
'NAME1' 'Name' '35' 'GT_KNA1' space space changing gt_fieldcat,
'LAND1' 'Country' '4' 'GT_KNA1' space space changing gt_fieldcat,
'ORT01' 'City' '35' 'GT_KNA1' space space changing gt_fieldcat.
perform sub_build_alv_events changing gt_events.
perform sub_comment_build tables s_kunnr changing gt_list_top_of_page.
PERFORM sub_display using gv_repid gt_fieldcat gt_events gt_kna1.
ENDFUNCTION.
form sub_get_customers tables p_kunnr structure JITO_KUNNR_RANGE
changing p_it_kna1 type tt_kna1.
select kunnr name1 land1 ort01
from kna1
into table p_it_kna1
where kunnr in p_kunnr.
if sy-subrc eq 0.
sort p_it_kna1 by kunnr.
endif.
endform.
Prepare Field Catalog
-->lv_F fieldname
-->lv_D column Description
-->lv_L Output length
-->lv_T Tablename
--lv_A Reference table name
--lv_B Reference Field Name
FORM sub_prepare_fieldcatalog using value(lv_f)
value(lv_d)
value(lv_t)
value(lv_l)
value(lv_a)
value(lv_b)
changing pt_fieldcat TYPE slis_t_fieldcat_alv.
DATA: gs_fieldcat TYPE slis_fieldcat_alv.
gs_fieldcat-fieldname = lv_f.
gs_fieldcat-seltext_m = lv_d.
gs_fieldcat-tabname = lv_t.
gs_fieldcat-outputlen = lv_l.
gs_fieldcat-ref_tabname = lv_a.
gs_fieldcat-ref_fieldname = lv_b.
APPEND gs_fieldcat TO Pt_fieldcat.
CLEAR gs_fieldcat.
ENDFORM. "sub_prepare_fieldcatalog
*& Form sub_build_alv_events
FORM sub_build_alv_events CHANGING PT_EVENTS TYPE slis_t_event.
DATA: ls_index TYPE sy-tabix,
GS_EVENTS TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = Pt_events[]
EXCEPTIONS
list_type_wrong = 0
OTHERS = 0.
READ TABLE Pt_events
INTO gs_events
WITH KEY name = slis_ev_top_of_page
IF sy-subrc = 0.
ls_index = sy-tabix.
gs_events-form = c_ev_top_of_page.
MODIFY Pt_events FROM gs_events INDEX ls_index.
ENDIF.
CLEAR gs_events.
ENDFORM. " sub_build_alv_events
*& Form sub_comment_build
text: print select options in the output
FORM sub_comment_build tables p_kunnr structure JITO_KUNNR_RANGE
changing gt_top_of_page type slis_t_listheader.
DATA: ls_line TYPE slis_listheader,
lv_Low(10) type c,
lv_high(10) type c.
lv_low = p_kunnr-low.
lv_high = p_kunnr-high.
CLEAR: ls_line.
ls_line-typ = 'H'.
ls_line-info = 'Customer Details'.
APPEND ls_line TO gt_top_of_page.
IF NOT lv_low IS INITIAL AND NOT lv_high IS INITIAL.
CLEAR: ls_line.
ls_line-typ = 'S'.
ls_line-key = 'Customer No'. "TEXT DESCRIPTION
CONCATENATE lv_low 'to' lv_high INTO ls_line-info
SEPARATED BY space.
APPEND ls_line TO gt_top_of_page.
elseif lv_low is initial and lv_high is initial.
CLEAR: ls_line.
ls_line-typ = 'S'.
ls_line-key = 'Customer No'.
ls_line-info = 'ALL Values'.
APPEND ls_line TO gt_top_of_page.
ELSEIF lv_high IS INITIAL.
CLEAR: ls_line.
ls_line-typ = 'S'.
ls_line-key = 'Customer No'.
ls_line-info = lv_low.
APPEND ls_line TO gt_top_of_page.
ENDIF.
endform.
form SUB_EVENT_TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gt_list_top_of_page.
ENDFORM. "sub_comment_build
**& Form sub_display
ALV Grid Display
Form sub_display using pv_repid type sy-repid
pt_fieldcat TYPE slis_t_fieldcat_alv
pt_events type slis_t_event
pt_kna1 type TT_kna1.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = pv_repid
it_fieldcat = Pt_fieldcat
it_events = Pt_events[]
TABLES
t_outtab = Pt_kna1
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. "sub_displayHello shakir,
You can refer to the code below:
TYPE-POOLS : slis.
* internal table declaration
Data:i_fieldcat TYPE STANDARD TABLE OF slis_fieldcat_alv,
top_header TYPE slis_t_listheader. "Table to store The Values of Top-Of-Page Parameter for ALV
* work area declaration
Data: wa_top_header TYPE slis_listheader,
wa_fieldcat TYPE slis_fieldcat_alv.
* CONSTANTS
CONSTANTS: c_h TYPE slis_listheader VALUE 'H',
c_s TYPE slis_listheader VALUE 'S'.
********* calling a subroutine to display the fields ********************
PERFORM zalv_display.
********* function module to display the report in Grid format ***********
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_top_of_page = 'TOP_OF_PAGE'
it_fieldcat = i_fieldcat
TABLES
t_outtab = i_final
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*& Form zalv_display
* Subroutine To display the fields in grid format
FORM zalv_display .
PERFORM zalv_grid_disp USING '1' 'CHARG' 'I_FINAL' 'Shotton coil id'.
PERFORM zalv_grid_disp USING '2' 'MATNR' 'I_FINAL' 'Material number'.
PERFORM zalv_grid_disp USING '3' 'BESTQ' 'I_FINAL' 'Stock Status'.
PERFORM zalv_grid_disp USING '4' 'AUFNR' 'I_FINAL' 'PROCESS ORDER NUMBER'.
PERFORM zalv_grid_disp USING '5' 'KDAUF' 'I_FINAL' 'SALES ORDER NUM'.
PERFORM zalv_grid_disp USING '6' 'GESME' 'I_FINAL' 'Coil Weight'.
PERFORM zalv_grid_disp USING '7' 'WDATU' 'I_FINAL' 'Date of coil receipt'.
PERFORM zalv_grid_disp USING '8' 'LGTYP' 'I_FINAL' 'Storage Type'.
PERFORM zalv_grid_disp USING '9' 'LGPLA' 'I_FINAL' 'Storage Bin'.
PERFORM zalv_grid_disp USING '10' 'COIL_STAT' 'I_FINAL' 'COIL STATUS'.
PERFORM zalv_grid_disp USING '11' 'MAKTX' 'I_FINAL' 'MATERIAL DESP'.
ENDFORM. " zalv_display
*& Form zalv_grid_disp
* text
* -->P_0691 column position
* -->P_0692 field name
* -->P_0693 table name
* -->P_0694 field text
FORM zalv_grid_disp USING value(col_pos) TYPE n
value(field_name) TYPE c
value(tab_name) TYPE c
value(sel_text) TYPE c.
wa_fieldcat-col_pos = col_pos.
wa_fieldcat-fieldname = field_name.
wa_fieldcat-tabname = tab_name.
wa_fieldcat-seltext_l = sel_text.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
ENDFORM. " zalv_grid_disp
*& Form top_of_page
* module to display Header Information
FORM top_of_page.
************************ HEADER ********************************
wa_top_header-typ = c_h.
CONCATENATE 'CONCESSION'
'COIL'
'REPORT'
INTO wa_top_header-info
SEPARATED BY space.
APPEND wa_top_header TO top_header.
CLEAR wa_top_header.
wa_top_header-typ = c_s.
wa_top_header-key = 'Date:'.
WRITE sy-datum TO wa_top_header-info.
APPEND wa_top_header TO top_header.
CLEAR wa_top_header.
wa_top_header-typ = c_s.
wa_top_header-key = 'User Name:'.
WRITE sy-uname TO wa_top_header-info.
APPEND wa_top_header TO top_header.
CLEAR wa_top_header.
* wa_top_header-typ = c_s.
* wa_top_header-key = 'No.Of Records :'.
* WRITE sy-dbcnt TO wa_top_header-info.
* APPEND wa_top_header TO top_header.
* CLEAR wa_top_header.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = top_header.
ENDFORM. "top_of_page -
XI-- IDOC scenario, how to link process code with function module
Hi Forum,
I have a XI--->IDOC (R/3) scenario,
where i m creating a IDOC in XI and sending it to R/3,
i have done all settings to send the IDOC from XI to the R/3,
i also have the function module to process that IDOC in R/3,
the problem is:
I want to know in details (step by step) how to make a Idoc Inbound process code, link it with the function module and use the process code in the Partner Profile in R/3,
pls helpHI,
FOr this u need to go to transaction WE41 for inbound and WE40 for outbound there u assign the function module.
Now u go to WE20 transaction for partner profile and u can assign the proces code to the inbound message.
Go to the below help for more information:
http://help.sap.com/saphelp_nw04/helpdata/en/72/c18ee5546a11d182cc0000e829fbfe/frameset.htm
Inbound process code:
http://help.sap.com/saphelp_nw04/helpdata/en/72/c18ee5546a11d182cc0000e829fbfe/frameset.htm
Thnx
Chirag -
Hi Gurus,
I have to connect two table through function module in ECC side.
Both table contains some field.
I am not much familiar with ABAP.
So PLease give some demo coding for this.
Coding to connect two tables by function module.
Thanks.
Saurabh JainHi,
Please find the sample code.Here I am extracting data from three tables.
SELECT
a~vbeln
a~MATNR
a~CHARG
a~POSNR
a~SPART
a~ERDAT
a~AEDAT
a~KWMENG
a~PSTYV
c~KUNNR
c~VKGRP
c~VKBUR
c~VTWEG
c~VKORG
c~BUKRS
c~VKGRP
FROM((VBAP AS a INNER JOIN VBPA AS b
ON avbeln = bvbeln
AND aposnr = bposnr)INNER JOIN VBAK AS c ON cvbeln = bvbeln
AND cposnr = bposnr).
Modify in the way you want and Just include these codes into the Funtion module you create.
I Hope it my help you.
Regards,
Prem -
Processing code and Function Module for IDOC
hi forum,
i m trying to make a file to IDOC scenario,
the IDOC is being sent to a R/3 system,
for the purpose, in R/3 i need to make a inbound processing code, can u tell me how to make a processing code and link it with a Function Module.......
can u guide me....sudheer,
If you are using standard idoc then you do not need to create new processing code.
There would be standard processing code available. You need to set input partner profile with processing code.
Let us know which idoc type you are using for inbound posting.
Anyway..TC for Creating processing code is : WE41(Outbound) and WE42 (Inbound)
Nilesh -
Process code's function module required for the IDOC Message type PROACT
Hi,
I am trying to trigger an IDOC from ME32K transaction which will carry my Contract agreement details to XI. The IDOC I am using for this purpose is PROACT.PROACT01. But I couldn't find the outbound process code / Function module for the process code associated to this IDOC message type.
Pls help me out....
Thanks,
Ram KalyanI checked table EDIFCT for the message type and found this:
Function module Function type Basic type Message Type
IDOC_INPUT_PROACT F PROACT01 PROACT
Oops...I think you are looking for outbound..Ignore -
Process code for Function Module IDOC_INPUT_MBGMCR
hello!!
here i m tryin to create n inbound idoc
idoc type - MBGMCR02
Function Module - IDOC_INPUT_MBGMCR
but i dont knw the process code for dat can ny 1 help me to find it?
1st of all how to find da process code if u hav the FM ?
it wld b more helpful if ny1 cld give me the process code
thank u
ashwineehai
if u dont have process code r cant able to find process code,
u create process code its very easy.
for inbound, go to
TX-WE42.
click create give ur process code and give that function module.
in processing type,
u check the radiobutton as processing by function module and save it.
then, u can use this process code in our partner profile .
any doubt regarding this u can ask me.
Message was edited by:
tamilarasan kandasamy -
Hello SAP professionals,
I've got the following error message when I ran T-code MIGO(Goods receipt).
Express document. "Update was terminated" received from author user-id
After I ran MIGO, the system said "Material document 5000000190 posted", but it wasn't.
I checked out T-code SM13 and found out function module "L_LK01_VERARBEITEN" was the cause of the error.
But I have no idea why the function module didn't work properly.
The error detail says as follows.
Class: BM
Number: 018
"Specify at least 1 unit"
I don't know what this "1 unit" refers to.
I will describe below the number range of FI for Goods receipt.
Document type: WE(Goods receipt)
Number range: 5000000000 - 5099999999 (now: 5000000021 so doesn't overlap with material document 5000000190)
I would really appreciate any help.
Thank you.Dear Jürgen L.
I've maintained a weight unit as you said, and I've solved the problem!!
I could successfully post a material document!
I don't know much about WM.
Thank you very much for your help.
Reagrds. -
Help on Code for functional module generic extraction - needed.
Hi Experts,
Can you pleaese help me on : how to pass data to the structure created.
How to fill the structure in functional module extraction (structure) from i_t_final to e_t_data.
we are using include programe in the extraction.
help appreciated.
Thanks Much
kannanHi Shreem,
Check if the following SDN Article link is helpful.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c062a3a8-f44c-2c10-ccb8-9b88fbdcb008?QuickLink=index&overridelayout=true
http://www.erphowtos.com/guides-a-tutorials/doc_view/534-generic-extraction-using-function-module-fm.html
Best Regards,
Kush Kashyap -
How can I add enhancement points in a function module
Hi,
I want to create the Z Enhancement implementation in ABAP. We are on ECC 6.0. I want to add a Z enchancment in funciton module MRM_FINAL_CHECK can you please let me know how
Thanks for reading.Hi Srikrishna,
Refer following link.. I'm sure these are very helpful to u..
http://help.sap.com/saphelp_nw04s/helpdata/en/42/d356adddec036fe10000000a114cbd/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/42/d356adddec036fe10000000a114cbd/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/42/d356adddec036fe10000000a114cbd/frameset.htm
Regards,
Vivek -
Function Module for splitting(field) in CO02 t-code
Function Module or enhancement for splitting(field) in CO02 t-code Need function module for inserting a value in field(Max No of splits) in Transaction CO02
Message was edited by:
Mohan KumarYou can use this SAP enhancement PPCO0012 to display your own additional
information on a separate tab page in the production order header. You
can also make user fields avaialble for input, change them, and return
the changes to the order header. -
Enhancing Function Module Extractor
Is it possible to enhance an extract structure which is using a function module as an extractor.
Basically I want to extract some more fields which the function module is not extracting. Can someone let me know how to do this.
Best Regards,
James.hi James,
is it generic extractor or business content ?
if generic extractor, since it's our own, you can add field(s) in extract structure and add code in the function module to populate these fields.
go to transaction RSO2, and you will see the extract structure, use SE11 to 'change' the structure and activate. then add code in function module, use SE37.
if business content, RSA6, choose your datasource and double click the extract structure and click 'append structure', add field(s) with prefix ZZ. activate the structure.
and populate the field(s) via user exit ZXRSAU01 (for transaction data).
hope this helps.
Maybe you are looking for
-
Flash Player 10 on PowerPC G5 Not working, please HELP
Hi there, I just setup the last version of flash player 10 (10.045.2) and it doesn't work at all. I have a PPC G5 Dual 2Ghz 2.5Gb Ram running Leopard 10.5.8 I was running the version 10 of flkash player when I download this new one and everything jus
-
Java sdk 1.4.2 Windows 2008 SAP ECC 6.0 SR3
Hello, I want to install SAP ECC 6.0 SR3on server which is running windows 2008. The operation system is 64 bit version with a Xeon processor. I folow the following path to Download a j2sdk version http://java.sun.com/j2se/1.4.2/SAP/download.html. Do
-
hi experts, Still now i am using to get data of G/L accounts items i use BSEG cluster table. As we know it takes more time for data extraction. Can i use BSIS table instead of BSEG table? Do both the tables contains the same data? Points will be rewa
-
Hi, I am an engineer of bangladesh television. We are using HP xw8400 with CS3 production premium and matrox axio le. because of Operating system problem, I have recovered OS (XP-sp2) from Recovery drive. I am trying to install a fresh copy of CS3 pr
-
Wouldn't it be nice to be able to add multiple audio files directly in@to the slideshow....Right now we have to select the files and add them together using a separate audio editing program before we can tether it to the slideshow.......