Need help in PBEN0011 user exit
Hello Experts,
I am using EXIT_SAPLHRBEN00GENERAL_011 FM of PBEN0011 user exit to calculate the coverage amount.But in my requirement i have to calculate that based on the PA0008-TRFST(pay scale level).But in this user exit there is pernr field in import parameters.
I need perner to read the pay scale level for that employee.
Please help...is there any way to access the screen fileds like pernr ,begda,endda in the user exit if they are being passed to the user exit.
Thanks in advance..
Shweta
Hello All,
I want to copy all queries under one infoset and user group to new infoset.I tried copying using copy function vaialable in goto menu.But it is giving error for the query having varian.
I am unable to copy the queries with variants. And I am getting following message:
Error when copying query report XXXXXXX= with variants. Error when importing query
Please help...
Thank you in advance
Shweta
Similar Messages
-
Need help urgently in user exit
Hi experts,
i m new to the concept of user exit.
shud anyone have very good coding knowledge for doing uiser exit.
i havent got a clear idea about my specification.
problem: one of the sd transaction code (dnt know the transaction code)) there is a tabstrip or table control window.In that windoww i m supppose to add one more column.
This is an idea that i recieved from the sd consultant, i havebnnt recieved my spec yet.
pls p[ls help me.
i need to perform this task very well so pls guide me
will reward for sure
sincerely
jayHi Jaya
For using USER EXISTS you need Access Key from SAP.If you know the TCODE follow the procedure given below.
->enter TCODE in command field
->enter
->System(Menu item)
->Status(in drop down list)
->Double click on Program(screen) name
->you will find empty INCLUDE programs under commented heading USER EXISTS.
->Read the Description given for each INCLUDE and select the required one.
->Double click on hte INCLUDE.
You'll see a pop-up asking for access key, which we should get from SAP.Without Access Key you cannot use USER EXISTS.
Regards
Lakshman -
Need help with transporting User Exit Variable in CMOD ZXRSRU01
Hello Gurus.,
I changed the existing user exit variable in CMOD ZXRSRU01.,before changing neither it ask for any transport request, nor when I activated the include program .
Well., I tried this........I went to goto-> Object Directory Entry.,
changed the Package and person responsible for and then it asked for transport request...but this dint work...
Now., how can I capture the changes in a transport request, so that, i can move the changes to production system?
is there anyway to solve my problem?
Regards,
PNKThanks for ur help VIKRAM...i solved the issue...the changes are captured in someother request, but it was not showing in the Version Management.'
I checked the Lock Overview in the Object DIrectory Entry and found out that it was capturing in different request. I released the request and when I tried to change the code, it asked for new transport request.
It worked..
Thanks for your help..
Regards,
PNK -
I have two requirements like
1.When the SAP Sales Order is shipped a SAP iDoc DESADV will be triggered. Note This idoc already exists.
2. On the generation of a Shiping Document Reversal (Trans code VL09) and Idoc will be created
I want to get the user exits for both the cases.If output determination is set up correctly you shouldn't need user exits for that.
P.S. Wrong forum. -
Urgent. Need to know about user exits.
Hello Everyone,
I am new to this forum. I need to know about user exits.
My next project requires me to implement user exits, screen exits, etc.
I am a rookie to this topic.
Can anyone help me as to how to start with his topic.
Any sort of help is appreciated.
Cheers,
Neelam.Hi Neelam,
Welcome to sdn.
This is a very frequently asked topic.
Please use teh search forum option for this type of queries.
http://help.sap.com/saphelp_47x200/helpdata/en/c8/19763443b111d1896f0000e8322d00/frameset.htm
Regards,
Ravi -
Need to know the user exit to change unlimited check box in delivery tag
Need to know the user exit,
To change the <b>unlimited check box(</b>EKPO-UEBTK) in <b>delivery tag</b> of <b>item details</b> for tcode <b>ME21N/ME22N</b> on <b>SAVE</b>.
Thanks in Advance.
BaburajHI Baburaj,
Use the BADI ME_PROCESS_PO_CUST to change the unlimited check box(EKPO-UEBTK)
Implement the BADI and insert the code in the method PROCESS_ITEM
Example code :
*Data Declarations
DATA: ls_mepoitem TYPE mepoitem,
ls_mepoitemx type mepoitemx,
ls_customer TYPE mepo_badi_exampl,
ls_tbsg TYPE tbsg.
INCLUDE mm_messages_mac. "useful macros for message handling
*here we get item data
ls_mepoitem = im_item->get_data( ).
*work area for price value
data : begin of it_eban,
banfn type mepoitem-banfn,
bnfpo type mepoitem-BNFPO,
pries type mepoitem-NETPR,
end of it_eban.
*Get the Purchase requisition price from EBAN table
select single banfn bnfpo preis from eban into it_eban
where
banfn = ls_mepoitem-banfn
and bnfpo = ls_mepoitem-bnfpo.
*if entry is available.
if sy-subrc eq 0.
*check if price is zero
if it_eban-pries EQ 0.
*if zero, set FREE field of PO to 'X'.
ls_mepoitem-uebtk = 'X'.
endif.
endif.
*Set updated fields
CALL METHOD im_item->set_data
EXPORTING
im_data = ls_mepoitem
Reward if Helpful***** -
Please help me with user-exits or baids for TCode : FOE2 & FOE1
Hi Experts
Please help me with user-exits or baids for TCode : FOE2 & FOE1.
I found these but not picking values from VIMI01,VIOB03 and VIOB41.
User-exits
FVCH0001 CH-specific enhancements: Esp. POR
ISRE0001 Determine bank procedure account no.
ISRE0002 IPD reporting data retrieval
Business Add-in
FVD_HANDLE_FORMULA Processing of Condition FormulasHi,
ASk your basis regarding the CI_CSKB table active issue, and first of all i dont see any table with the name CI_CSKB.
And check this exit-COOMKS03 whether it works for your screen exits.
Cheers!!
VEnk@
Edited by: Venkat Reddy on Nov 4, 2008 5:59 PM -
Need a badi or user exit which can trigger tr:AR31
need a badi or user exit which can trigger tr:AR31 ,based on ANLA-AKTIV,ANLB-AFABG.AND COULD ANY ONE explain indetail
There is no BADi for AR31 but you can use Exit:
AINT0002 Substitution of offsetting accounts in out- and inflow ...
AINT0003 Defining percentage/amount of repayment by invest. support -
Help needed in BAdi and user-exits
Hi ,
Can any one send me the procedure how to find out user-exits and about BAdi's.
Thanks in advance
Udayhi Uday,
Welcome to <b>SDN</b>
here is the sample program to find the user exits
Finding the user-exits of a SAP transaction code
Finding the user-exits of a SAP transaction code
Enter the transaction code in which you are looking for the user-exit
and it will list you the list of user-exits in the transaction code.
Also a drill down is possible which will help you to branch to SMOD.
Written by : SAP Basis, ABAP Programming and Other IMG Stuff
http://www.sap-img.com/*
report zuserexit no standard page heading.
tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
tables : tstct.
data : jtab like tadir occurs 0 with header line.
data : field1(30).
data : v_devclass like tadir-devclass.
parameters : p_tcode like tstc-tcode obligatory.
select single * from tstc where tcode eq p_tcode.
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 eq enlfdir-area.
move : tadir-devclass to v_devclass.
endif.
endif.
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.
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.
*---End of Program
To find the function exit
REPORT ZV_FIND_EXIT NO STANDARD PAGE HEADING.
TABLES : TSTC, TADIR, MODSAPT, MODACT, TRDIR, TFDIR, ENLFDIR.
TABLES : TSTCT.
DATA : JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.
DATA : FIELD1(30).
DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.
PARAMETERS : P_TCODE LIKE TSTC-TCODE OBLIGATORY.
SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.
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 EQ ENLFDIR-AREA.
MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
ENDIF.
ENDIF.
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.
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.
or
1. in se11, goto table MODSAP
View table contents
2. in Type field, enter 'E' (for function exit)
3. For that tcode, u should know the program name.
eg. SAPLLMOB
4. then type SAPLLMOB and execute
or
REPORT z34331_user_exit .
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
DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
DATA : field1(30).
DATA : v_devclass LIKE tadir-devclass.
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-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.
if u find it useful plz markt the points
Regards,
Naveen -
Name of the structure needed for sales order user exit
Hi,
I am planning to write a user exit which will insert the data into my ztable the moment the new sales order is created and is saved.
I have identified FORM USEREXIT_SAVE_DOCUMENT as the necessary user exit. But the problem is that while inserting the data into the ztable I cannot insert the data from vbak as the data will be inserted into this table after the SO is saved.
Thus I need to identify a structure which is used to populate the vbak table so that it simultaneously inserts the data in the ztable as well. Can anyone help me with the name of the structure so that these fields i.e. vbeln, vkorg, vtweg, spart are inserted into my ztable?
Also need to know how to convert the net value i.e. vbak-netwr in Indian Rupees as it gets stored as Dollars ....
Thanks,
Vinod.Hi,
One of the structure being used is RV45A, there are several other str's being used as well for various calculations,
check out program SAPMV45A for the same.
& in order to convert vbak-netwr to rupees use the below statemetnt,
WRITE vbak-netwr TO zvbak-netwr CURRENCY INR.
Regards,
Raghavendra
Message was edited by:
raghavendra ay -
Need a badi or user exit to update numbers at level of Goods Receipt level
Hi I need to update serial number based on combination of plant, company code and fiscal year while generating a Goods Receipt by using MIGO transaction code.
Step1) once run the MIGO transaction, here enter values of Purchase Order, Quantity, and delivery note and check the item ok check box for goods receipt.
Step2) Then check for any warnings and errors by clicking the check button/tabular
Step3) Finally post the goods receipt for the purchase order by clicking Post button/tabular.
Result:
Then system will provides the Material of Document number for the goods receipt of purchase order. That number like 5000000342.
Here client wants to put his number like V500000001.for one combination of plant, company code and fiscal year.
Example
Z TABLE AS LIKE BELOW COMBINATION
Plant company code first no end no current no FISCAL YR
7800/7801 2000 V500000001 V599999999
7802/7803 3000 F500000001 F599999999
7804 4000 D500000001 D599999999
Whenever end user generates a GR then System should display one of above number instead of systems generate value.
I have used to fix the issue badi> mb_badi_migo document_badi_update and user exit-> mb_cf001, mbcf0002 but not found the solution.
Please provide me needful information.
Thanks,
RajHi
<b>Here is the sample code...</b>
method if_ex_mb_migo_badi~post_document .
data: ls_migo_badi_example type migo_badi_exampl,
lt_migo_badi_example type table of migo_badi_exampl,
ls_extdata type migo_badi_example_screen_field,
ls_xmseg type mseg.
field-symbols: <gt_extdata> type migo_badi_example_screen_field.
* Transaction MIGO will now post a material document.
* Any errors here MUST be issued as A-message (better: X-message)
* Copy data from material document into internal table
loop at gt_extdata into ls_extdata.
if g_cancel is initial.
read table it_mseg into ls_xmseg
with key line_id = ls_extdata-line_id.
else.
read table it_mseg into ls_xmseg
with key smbln = ls_extdata-mblnr
smblp = ls_extdata-zeile
sjahr = ls_extdata-mjahr.
endif.
if sy-subrc is initial.
move-corresponding ls_extdata to ls_migo_badi_example.
move-corresponding ls_xmseg to ls_migo_badi_example.
append ls_migo_badi_example to lt_migo_badi_example.
endif.
endloop.
* The data from external detail screen can be saved now:
check gt_extdata is not initial.
call function 'MIGO_BADI_EXAMPLE_UPATE_DATA' in update task
tables
it_migo_badi_example = lt_migo_badi_example.
* The data from external header screen can be saved now:
move-corresponding is_mkpf to gs_exdata_header.
call function 'MIGO_BADI_EXAMPLE_UPDATE_HEAD' in update task
exporting
is_migo_badi_header_fields = gs_exdata_header.
endmethod. "IF_EX_MB_MIGO_BADI~POST_DOCUMENT
Hope this will help.
Please reward suitable points.
Regards
- Atul -
Help required regarding user exit for STPSHH01 IDOC
Need help regarding user exit.
I append the structure of VTTP and add one field with the name of ZDELCST i.e Delivery cost so i want to update that table once the idoc will post.
I have to write the user exit for this but i have no idea how to do this so kindly requesting someone to please write the code for me and i will be very grateful to him/her.
The functional module is IDOC_INPUT_SHIPPL
and there is a CALL CUSTOMER-FUNCTION '012'
this will take us to function module EXIT_SAPLV56I_012
This includes ZXV56U08
Within this include in need to map the delivery cost from the idoc to the new append filed VTTP-ZDELCSTHi,
use this FM to update ur shipment
variables
DATA: lo_tp_g_tra TYPE v56e_shipment_activities, "Data to modify
lo_tp_g_shp TYPE v56e_shipment,
lo_tp_g_log TYPE v56e_logfile, " Errors function
call the function to modify shipments
CALL FUNCTION 'SD_SHIPMENT_PROCESS'
IMPORTING
e_logfile = lo_tp_g_log
CHANGING
c_activities = lo_tp_g_tra
c_shipment = lo_tp_g_shp
EXCEPTIONS
error = 1
OTHERS = 2.
Thanks,
Sendil. -
HELP..migo user Exit
HI all..
please help me...
this is my third post and i badly need a user exit after posting of material document..
is there a user exit avaible before migo will pop up the success message Material document number 49000000 posted?..
because in my requiremnt, material document must be posted(save in table mseg mkpf ) and all lock entries(material batch etd) are already released..
thanks u very much.Hi ,
You can use BADI MB_DOCUMENT_BADI ( MB_DOCUMENT_UPDATE ),
here u will have the Doc number too..
The following steps to activate the BADI.
1. Execute Business Add-In(BADI) transaction SE18
2. Enter BADI name i.e. MB_DOCUMENT_BADI and press the display
button
3. Select menu option Implementation->Create
4. Give implementation a name such as Z_MB_DOCUMENT_BADI( depends on the naming conbvention)
5. You can now make any changes you require to the BADI within this
implementation, for example choose the Interface tab
6. Double click on the method you want to change, you can now enter
any code you require. ( SE19 )
7. Please note to find out what import and export parameters a
method has got return the original BADI definition
(i.e. MB_DOCUMENT_BADI) and double click on the method name
for example within MB_DOCUMENT_BEFORE_UPDATE is a method
8. When changes have been made activate the implementation
Please rewards the point if answer is helpful.
Regards. -
Help required with User exit logic
Hi gurus,
Please help me with the logic I wrote for the user exit for a PP Work Center View extract structure. Here is the details of the add on fields: VGW01, VGW02, VGW03, STEUS(from table PLPO); DataSource: 2LIS_04_P_ARBPL,
data: l_s_pp1 like MC04P_0ARB(extract structure of 2LIS_04_P_ARBPL),
l_tabix like sy-tabix,
lv_VGW01 like PLPO-VGW01.
lv_VGW02 like PLPO-VGW02.
lv_VGW03 like PLPO-VGW03.
lv_STEUS like PLPO-STEUS.
tables : PLPO.
case i_datasource.
when '2LIS_04_P_ARBPL'.
loop at c_t_data into l_s_pp1.
select single vgw01into lv_vgw01
from PLPO
where field = l_s_pp1-field.
if sy-subrc = 0.
l_s_pp-zzvgw01 = lv_vgw01.
l_s_pp-zzvgw02 = lv_vgw02.
l_s_pp-zzvgw03 = lv_vgw03.
l_s_pp-zzsteus = lv_steus.
endif.
modify c_t_data from l_s_pp1 index l_tabix.
endloop.
Any additional comments welcome. Thanks in advance.Hi,
Try coding as per the below code
case i_datasource.
When '2LIS_04_P_ARBPL'.
DATA: lt_data TYPE TABLE OF MC04P_0ARB.
FIELD-SYMBOLS: <ls_data> TYPE MC04P_0ARB.
Internal table for
TYPES:
BEGIN OF ty_tbl1,
lv_VGW01 TYPE PLPO-VGW01,
lv_VGW02 TYPE PLPO-VGW02,
lv_VGW03 TYPE PLPO-VGW03,
l_bmsch TYPE XXXX-XXXX,
l_plnnr TYPE XXXX-XXXX
l_datuv TYPE XXXX-XXXX
l_aennr TYPE XXXX-XXXX
l_plnkn TYPE XXXX-XXXX
l_plnal TYPE XXXX-XXXX
END OF ty_tbl1.
DATA:
lt_tb1 type standard table of ty_tbq,
ls_tb1 type ty_tb1.
lt_data[] = c_t_data[].
Read data into internal memory using jOins
select aVGW01 aVGW02 aVGW02 aVGW02 bbmsch bplnnr bdatuv baennr bplnkn bplnal into into CORRESPONDING FIELDS OF TABLE
lt_tb1 from PLPO as a innerjoin XXXX as b where aXXXX=bXXXX.
use the internal table to get the data to the enhaced fileds
LOOP AT lt_data ASSIGNING <ls_data>.
read table lt_tb1 into ls_tb1
with key XXXXX = <ls_data>-XXXX .
if sy-subrc eq 0.
<ls_data>-lV_VGW01 = ls_tb1-lv_VGW01,
<ls_data>-lV_VGW02 = ls_tb1-lv_VGW02,
<ls_data>-lV_VGW03 = ls_tb1-lv_VGW03,
<ls_data>-bmsch = ls_tb1-bmsch,
<ls_data>-plnnr = ls_tb1-plnnr,
<ls_data>-datuv = ls_tb1-datuv,
<ls_data>-aennr = ls_tb1-aennr,
<ls_data>-plnkn = ls_tb1-plnkn,
<ls_data>-pln1l = ls_tb1-plnal.
MODIFY lt_data FROM <ls_data>.
endif.
ENDLOOP.
REFRESH c_t_data.
c_t_data[] = lt_data[].
Note that the code is not written with the exact fields. Change the fields where necessary(also i have joined only 2 tables if needs to be joind form more than 2 table change the join statement accordingly).
Thanks,
Nagarjuna
Edited by: Nagarjuna Reddy on Oct 20, 2011 3:39 AM -
Help with BDC, user exits and BAPI
Hello all:
1) I posted a question before about BDC documentation and people sent me lot of helpful material. Thanks to all of them. I am very new to ABAP coming from VB background and wondering if someone can tell me how to practice one simple BDC program starting from scratch. What do I first need to do to get started? I have Mini WAS 6.20 test version and like to practice BDC programming.
2) What are user exits and BADI and can anyone provide some documentation and sample code if possible.
Thanks everyone in advance.
--Mithun.Hai Mithun Dha
Go through the following Documentation & Example Code
Just check these links.
Diff. between LSMW & BDC?
BDC SESSION
CALL TRANSACTION
CALL DIALOG
What is BDC or batch input
The Batch Input is a SAP technic that allows automating the input in transactions. It lies on a BDC (Batch Data Commands) scenario.
BDC functions:
E BDC_OPEN_GROUP : Opens a session group
E BDC_CLOSE_GROUP : Closes a session
E BDC_INSERT : Insert a BDC scenario in the session
E The ABAP statement "CALL TRANSACTION" is also called to run directly a transaction from its BDC table.
It runs the program RSBDCSUB in order to launch automatically the session. The session management is done through the transaction code SM35.
The object itself is maintanable through the transaction SE24.
BDC methods:
Method
Description
Parameters
OPEN_SESSION
Opens a session
SUBRC (Return Code ? 0 OK)
SESSIONNAME (Session to be created)
CLOSE_SESSION
Closes a session
None
RESET_BDCDATA
Resets the BDC Internal Table...
None. Normally, for internal purposec
BDC_DYNPRO
Handles a new screen
PROGNAME (Name of the program)
DYNPRONR (Screen Number)
BDC_FIELD
Puts a value on the screen
FIELDNAME (Name of the field)
FIELDVALUE (Value to be passed)
CONSTRUCTOR
Constructor - Initializes NO_DATA
NODATA (No data character). The constructor is called automatically when the object is created.
RUN_SESSION
Launches a session with RSBDCBTC
None
CALL_TRANSACTION
Calls a transaction with the current BDC Data
MODE (Display Mode)
UPDATE (Update Mode)
TCODE (Transaction to be called)
BDC_INSERT
Inserts the BDC scenario in the session
TCODE (Transaction to be called)
BDC techniques used in programs:
1) Building a BDC table and calling a transaction,
2) Building a session and a set of BDC scenarios and keeping the session available in SM35,
3) Building a session and lauching the transaction right after closing the session.
BDC using Call Transaction
BDC using Call transaction involves calling an SAP transaction in back ground from within the ABAP
program. The process involves building an Internal BDC table containing the screen information needed to
execute the required transaction and then passing this to the Call transaction command (See code example).
The full procedure for creating a BDC program is as follows:
What is the difference between batch input and call transaction in BDC?
Session method.
1) synchronous processing.
2) can tranfer large amount of data.
3) processing is slower.
4) error log is created
5) data is not updated until session is processed.
Call transaction.
1) asynchronous processing
2) can transfer small amount of data
3) processing is faster.
4) errors need to be handled explicitly
5) data is updated automatically
BATINPUT/DIRECT INPUT
A: Batch-inputs can not be used to fill the "delivery due list" screen because it is not a dynpro. This is a standard SAP report. A SAP report (check with "System -> Status") may be called using SUBMIT sentence with the appropriate options . It is preferred to call a report than create a Batch-input program.
GO THROUGH THIS LINK
http://www.guidancetech.com/people/holland/sap/abap/zzsni001.htm
check with this code
include bdcrecx1.
tables : mara.
data : begin of it_mara occurs 0,
matnr like mara-matnr,
mbrsh like mara-mbrsh,
mtart like mara-mtart,
maktx like makt-maktx,
meins like mara-meins,
end of it_mara.
start-of-selection.
perform upload_data.
perform open_group.
loop at it_mara.
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MATNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RMMG1-MATNR'
it_mara-matnr.
perform bdc_field using 'RMMG1-MBRSH'
it_mara-mbrsh.
perform bdc_field using 'RMMG1-MTART'
it_mara-mtart.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(02)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
'X'.
perform bdc_field using 'MSICHTAUSW-KZSEL(02)'
'X'.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_field using 'MAKT-MAKTX'
it_mara-maktx.
perform bdc_field using 'BDC_CURSOR'
'MARA-MEINS'.
perform bdc_field using 'MARA-MEINS'
it_mara-meins.
perform bdc_field using 'MARA-MTPOS_MARA'
'NORM'.
perform bdc_transaction using 'MM01'.
endloop.
perform close_group.
*& Form upload_data
text
--> p1 text
<-- p2 text
FORM upload_data .
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'c:\mat_bdc.txt'
FILETYPE = 'ASC'
TABLES
DATA_TAB = it_mara.
IF SY-SUBRC = 0.
SORT IT_MARA BY MATNR.
ENDIF.
ENDFORM. " upload_data
flat file structure is
PRANIT_011 CCOUP This is Testing material kg
PRANIT_012 CCOUP This is Testing material kg
PRANIT_013 CCOUP This is Testing material kg
PRANIT_014 CCOUP This is Testing material kg
PRANIT_015 CCOUP This is Testing material kg
when your selecting views
this particular material will belongs to Po/Sales or some other areas .
when you select basic 1 --it gives description
select basic 2 -- it gives tax ,amount, base unit of measurement
BDC TO BAPI
The steps to be followed are :
1. Find out the relevant BAPI (BAPI_SALESORDER_CHANGE for VA02).
[for VA01 use BAPI_SALESORDER_CREATEFROMDAT2]
2. Create a Z program and call the BAPi (same as a Funtion module call).
2. Now, if you see this BAPi, it has
-> Importing structures.
eg: SALESDOCUMENT: this will take the Sales order header data as input.
-> Tables parameters:
eg: ORDER_ITEM_IN: this will take the line item data as input.
Note :
Only specify fields that should be changed
Select these fields by entering an X in the checkboxes
Enter a U in the UPDATEFLAG field
Always specify key fields when changing the data, including in the checkboxes
The configuration is an exception here. If this needs to be changed, you need to complete it again fully.
Maintain quantities and dates in the schedule line data
Possible UPDATEFLAGS:
U = change
D = delete
I = add
Example
1. Delete the whole order
2. Delete order items
3. Change the order
4. Change the configuration
Notes
1. Minimum entry:
You must enter the order number in the SALESDOCUMENT structure.
You must always enter key fields for changes.
You must always specify the update indicator in the ORDER_HEADER_INX.
2. Commit control:
The BAPI does not run a database Commit, which means that the application must trigger the Commit so that the changes are read to the database. To do this, use the BAPI_TRANSACTION_COMMIT BAPI.
For further details... refer to the Function Module documentation for the BAPi.
For User Exits
User Exits
Screen exits are exits that allow you to use a reserved part of the screen (A subscreen) to display or input data.
It is determined be SAP where the sub screen will be displayed.
The syntax is: CALL CUSTOMER-SUBSCREEN
The screen exit is not processed untill the corresponding subscreen has been created in an enhancement project,
and the project has been activated.
Note:
Function codes are only processed in the main screens flow logic
You are not allowed to enter a name for the subscreens command field
You are not allowed to define GUI stauses
You are not allowed to enter a value for Next screen
The global data of the program is not available for the subscreen. Data for the subscreen is provided by function modules.
These function modules belongs to the same function group as the subscreen Subscreens are edited with transaction CMOD.
When you activate a project containg subscreens, the calling screen is regenerated and the subscreen is displayed next
time you display the calling screen
The developer must create the subscreen and the corresponding PBO and PAI modules
How to identify screen exits
Look after CALL CUSTOMER-SUBSCREEN in the screenprogram of the screen you want to modify.
Use transaction CMOD menu Utillities -> SAP enhancements to search for screen exits
MENU EXITS
Menu exits allow you to add your own functionallity to menus. Menu exits are implemented by SAP, and are reserved menu
entries in the GUI interface. The developer can add his/her own text and logic for the menu.
Function codes for menu exits all start with "+"
Example
We want to create a new menu item in the Office menu. The text for the menu should be "Run ZTEST", and the menu will
run report ZTEST.
Goto transaction SE43 Area Menu Maintenance
In Area Menu Paramenter type 'S000' (S triple Zero)
Select Change and ignore all the warning screens
Expand the office menu. In the buttom of the office tree you will find a menu named "Customer function"
Double click on the text. In the pop-up screen change the text to "Run ZTEST". Note that the trsnaction code is +C01
Goto transaction SE93 and create transaction +C01 that calls report ZTEST.
Now you will se the menu displayed in the office tree. If you delete transaction +C01 again, the new menu will dissapear.
USER EXITS
User exits (Function module exits) are exits developed by SAP. The exit is implementerd as a call to a functionmodule.
The code for the function module is writeen by the developer. You are not writing the code directly in the function module,
but in the include that is implemented in the function module.
The naming standard of function modules for functionmodule exits is: EXIT_<program name><3 digit suffix>
The call to a functionmodule exit is implemented as: CALL CUSTOMER.-FUNCTION <3 digit suffix>
Example:
The program for transaction VA01 Create salesorder is SAPMV45A
If you search for CALL CUSTOMER-FUNCTION i program SAPMV45A you will find ( Among other user exits):
CALL CUSTOMER-FUNCTION '003'
exporting
xvbak = vbak
xvbuk = vbuk
xkomk = tkomk
importing
lvf_subrc = lvf_subrc
tables
xvbfa = xvbfa
xvbap = xvbap
xvbup = xvbup.
The exit calls function module EXIT_SAPMV45A_003
2. How to find user exits
Display the program where you are searching for and exit and search for CALL CUSTOMER-EXIT
If you know the Exit name, go to transaction CMOD. Choose menu Utillities->SAP Enhancements.
Enter the exit name and press enter.
You will now come to a screen that shows the function module exits for the exit.
3. Using Project management of SAP Enhancements
We want to create a project to enahance trasnaction VA01
Go to transaction CMOD
Create a project called ZVA01
Choose the Enhancement assign radio button and press the Change button
In the first column enter V45A0002 Predefine sold-to party in sales document . Note that an enhancement can only
be used i 1 project. If the enhancement is allready in use, and error message will be displayed
Press Save
Press Components. You can now see that enhancement uses user exit EXIT_SAPMV45A_002. Double click on the exit.
Now the function module is displayed. Double click on include ZXVVAU04 in the function module
Insert the following code into the include: E_KUNNR = '2155'.
Activate the include program. Go back to CMOD and activate the project.
Goto transaction VA01 and craete a salesorder. Note that Sold-to-party now automatically is "2155"
Have look at this links
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIOFFI/BCCIOFFI.pdf
http://www.sapgenie.com/abap/ole.htm
http://help.sap.com/saphelp_46c/helpdata/en/59/ae3f2e488f11d189490000e829fbbd/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIOFFI/BCCIOFFI.pdf
Creation of Field Exits
Step by step procedure for creating Field Exits
There are eight steps to creating a field exit:
Step 1: Determine Data Element
Step 2: Go To Field Exit Transaction
Step 3: Create Field Exit
Step 4: Create Function Module
Step 5: Code Function Module
Step 6: Activate Function Module
Step 7: Assign Program/Screen
Step 8: Activate Field Exit
Step 1: Determine Data Element
- Before you can begin adding the functionality for a field exit, you must know the corresponding data element.
- An easy way to determine the data element associated to a particular screen field is to:
Go the appropriate screen.
Position the cursor in the appropriate field.
Press eF1f for field-level help.
Click on the eTechnical infof pushbutton (or press eF9f) on the help dialog box.
On this Technical Information dialog box, the data element will be specified if the field is 'painted' from the ABAP/4 Dictionary.
Step 2: Go To Field Exit Transaction
- The transaction to create field exits is CMOD.
- You can use the menu path Tools -> ABAP/4 Workbench -> Utilities -> Enhancements -> Project management.
- From the initial screen of transaction CMOD, choose the Text enhancements -> Field exits menu path.
- After choosing this menu path, you will be taken to the field exits screen. From here, you can create a field exit.
NOTE : Even though you use transaction CMOD to maintain field exits, you do not need to create a project to activate field exits.
Step 3: Create Field Exit
- From the field exit screen of transaction CMOD, choose the Field exit -> Create menu path.
- After choosing this menu path, a dialog box will prompt you for the appropriate data element .
- Enter the data element name and click the eContinuef pushbutton.
- Now, you will be able to create the function module associated to the data elementfs field exit.
Step 4: Create Function Module
- You will automatically be taken to the Function Library (SE37) after entering a data element name and clicking the eContinuef pushbutton.
- In the eFunction modulef field, a function module name will be defaulted by the system based on the data element specified. This name will have the following convention:
FIELD_EXIT_<data element>
- You can add an identifier (an underscore followed by a single character ).
- The first function module for a data elementfs field exit must be created without an identifier.
- To create the function module, click on the eCreatef pushbutton, choose menu path Function module -> Create, or press eF5f.
- After choosing to create the function module, you will get the warning: "Function module name is reserved for SAP". This message is just a warning so a developer does not accidentally create a function module in the field exit name range. By pressing eEnterf, you will be able to go ahead and create the function module.
- Before coding the function module, you will have to specify the function modules attributes -- function group, application, and short text.
Step 5: Code Function Module
- From the function modulefs attributes screen, click on the eSource codef pushbutton or choose the Goto -> Function module menu path to the code of the function module.
- Here you will add your desired functionality for the field exit.
- Remember that field exitfs function module will have two parameters -- one importing parameter called "INPUT" and one exporting parameter called "OUTPUT". These parameters will be set up automatically by the system.
- You must remember to assign a value to the OUTPUT field. Even if the value does not change, it must be moved from the INPUT field to the OUTPUT field.
Step 6: Activate Function Module
- After coding the function module, you must remember to activate it.
- Use the Function module -> Activate menu path to activate the function module.
- At this point, you can return to the field exit transaction.
- You should be able to 'green arrow' back to this transaction.
- When you return to the field exit transaction, you will see an entry for the newly created field exit.
- At this point, the field exit is global. That is, it applies to all screens that use a particular data element. On any screen that uses the data element, the corresponding field exit function module will be triggered, once it is active.
- Also, the field exit will not be triggered yet because it is inactive.
Step 7: Assign Program/Screen
- This step is only needed if you want to make a field exit local.
- To make a field exit local, select the field exit and click on the eAssign prog./screenf pushbutton.
- In the dialog box , indicate the appropriate program name and screen number.
This information indicates that the field exit is local to the specified screen in the specified program.
- In the dialog box, you determine which function module gets executed for the field exit by specifying the identifier in the eFld. Exitf field.
- If this field is left blank, the function module triggered will be 'FIELD_EXIT_<data element>'.
- If a single-character identifier is entered into the field, the function module triggered will be 'FIELD_EXIT_<data element>_<identifier>'.
Step 8: Activate Field Exit
- The field exit must be active for it to be triggered by the system.
- Activate the field exit by choosing the Field exit -> Activate menu path.
- After assigning the field exit to a change request, its status will change to eActivef and it will be triggered automatically on the appropriate screen(s).
NOTE : In order to activate the field exit the profile parameter abap/fieldexit = YES must be set on all application servers
Thanks & regards
Sreenivasulu P
Maybe you are looking for
-
Can I share calendars on a work and personal device, with different iCloud user names?
I'm relatively new to my work iPhone, and very new to my iPad. I've been entering events in the iCloud calendar, which is linked to the iPad under a personal Apple id and password. My work iPhone, which (currently) has a different Apple id and passw
-
Why is the Yosemite download EXTREMELY slow?
I have the fastest internet available in my area and I usually download movies and other files of similar size to the Yosemite upgrade in just a few hours. When starting the download of Yosemite the download time was estimated at roughly 5 days 20 ho
-
Settings in OsX to hook up two computers trough Airport Express
I want to get access to a external harddrive with Mp3s that is connected to my iMac mini through my G5 that are both connected to my Airport netwoork at home. What would be the best way to set it up? What should the settings be on the computers?
-
Dialing area code for local call - is this normal?
Just had my FIOS triple play installed over the weekend. In the recent past I've used VOIP providers Optimum Voice, Vonage, Packet8, MagicJack and Ooma, and FIOS is the only one that makes me dial my area code to make a local call (I'm in area code 5
-
Thinkvanta​ge Access Connection for Windows Vista 64
My T61 HD has a crash. Need to reinstall everything. Tried to install ThinkVantage Access Connection but it does not work on Windows Vista x64. Is this right?