User Exit Fixed Point Arithmetic
Dear all,
I have developed some code on the user exit RV61AFZB and tried to change the value on the xkomv-kbetr. But, i found that the division result is wrong.
Example:
DATA: temp like xkomv-kbetr,
c_test LIKE xkomv-kbetr VALUE '152000.00',
c_qty like xkomv-kbetr value '3.00'.
temp = c_test / c_qty.
The value of temp became 506.67. Since, this is a user exit and i can't change program attribute "Fixed Point Arithmetic" .
Regards,
Kit
Hello
Try this:
DATA: temp like xkomv-kbetr,
c_test LIKE xkomv-kbetr VALUE '152000.00',
c_qty like xkomv-kbetr value '3.00'.
data: temp1 type i.
temp = c_test / c_qty.
temp1 = temp.
Similar Messages
-
User Exit / Enhancement Point to set exchange rate using GR date in MIRO
Dear experts,
I'm trying to set exchange rate not as default but using GR date (When I input the PO number and click enter, the exchange rate should be set). So when system set the exchange rate, it will use the PO date, not GR date.
What user exit / enhancement point / BADI should I use?
I've already tried all user exit and BADI for MIRO but still not succeed. Is there anyone who could help me?
Thank you very much..
Regards,
ShirleyHi,
So as to capture Exchange Rate w.r.t PO date, it is suggested to go for Development/Enhancement with required import purchasing doc types in it. While doing GR and before posting the document you need to capture the Exch Rate as per PO date and replace with GR date Exch rate present in it through development.
Regards, -
Usage of NOT having Fixed Point Arithmetic?
Hello!
SAP recommends to always do programs with Fixed Point Arithmetic attribute checked. Please don't explain here what is Fixed Point Arithmetic - I know this and it's is not my question.
The question is: why do we have it at all? Why aren't all programs simply fixed-point-arithmetic without attribute to activate or deactivate this?
I suppose that there are situations which require Fixed Point Arithmetic NOT being set, but I can't imagine any. Could anyone offer an explanation?
Thanks in advance!
Igor
Edited by: Igor Barbaric on Mar 21, 2008 9:30 AM
No replies - I'll try to bring the question to your attention once again:
Please, does anybody know the purpose of NOT having Fixed Point Arithmetic?Please check if this helps u
This attribute defines, whether for numerical data objects of data type p (packed numbers) is the decimal point is relevant in calculations or assignments or if it is omitted. Normally, this attribute is always switched on and you might ask, why it can be switched off at all. Well, in very ancient times packed numbers had no real decimal point. It was taken into account only for presentation purposes. In order to stay downward compatible, for the introduction of fixed point arithmetic this switch was needed. In fact there are still programs that switch fixed point arithmetic off ¨C for example financial programs that calculate on the basis of cents instead of dollars.
Thanks Arjun -
Need arithmetic operation result in Fixed point arithmetic disabled prg
Hi,
I am writing an enhancement which is in standard SAP program which is not enabled for 'Fixed arithmetic' calculations.
I need to do some actual arithmetic operation involving packed numbers in my enhancement.
Say
p1 = '2.00'
p2 = '12.00'.
result = p1 * p2.
result coming is 2400.00. This is because Fixed point arithmetic is disabled in standard program.
I need a result of 24.00 . Is there any solution to this apart from dividing it with 100?
Regards,
Dhanabased on P1 and P2 values you need to divide the value with 100 or 1000 as per the number of decimals on P1 and P2
-
Division without Fixed Point Arithmetic
Hello,
I am trying to divide 1 by a decimal, i.e. 1 / 7.75027, in Include RV63A900 of Function Group V61A. Since the ' Fixed Point Arithmetic' checkbox is not checked, I am unable to get this calculation to work.
I have tried different scenarios of using a floating point field to receive the quotient but nothing has worked.
Any suggestions?
Thank you,
Chris MowlI use floating variable some thing like this :
data: v_f TYPE f,
v_c TYPE char12.
v_f = ( wa_komp_o-netwr / o_komp-mglme ).
* Due to decimal issues had to use Floating point value
* for calculation of condition base value
CALL FUNCTION 'FLTP_CHAR_CONVERSION'
EXPORTING
decim = 5
input = v_f
IMPORTING
flstr = v_c.
v_amount = v_c * 10. -
User exit Shipping point determination
Hi,
Shipping point determination based on item category/loading group/site.
User exit is USER_EXIT_SOURCE_DETERMINATION
Any suggestion will be wellcomed
ThanksHi
i tried to find ur exit but it is not there
try using these
MV56AINI Initialization of transaction control for transportatio
V56AFCCH Shipment processing: Check function code allowed
V56AGTAR User Exit for Filtering Shipping Unit Calculation
V56ARCHV Customer-spec. checks for archiving shipments
V56ATKTX Change the number of lines for text input in shipment
V56BMOD Transportation processing: Field modification
V56DISTZ Shipment Processing: Determine Distance
V56FCOPY Shipment processing: Copy delivery data
V56FSTAT Shipment processing: Activities when setting a status
V56L0001 Status of Shipments for a Delivery
V56LDELI Read Delivery Data for Shipment Processing
V56LOCID Shipment Processing: Determine Location Identification
V56MVT04 Extensions for Collective Processing of Shipments
V56SLDET Shipment processing: Leg determination
V56TDLIF Filter Delivery Items for Shipment
V56UCHCH Shipment processing: Check whether changes were made
V56UCHCO Check shipments are complete
V56UDLUP Obsolete as of 4.6C: Delivery Update on Delivery Routin
V56UNUMB Shipment number allocation
V56USTAT User-individual definition of transportation planning s
V56USVDO Update new objects for transport
V56USVDP Preparation for updating new objects for transport?
Regards
Shiva -
Hi
while debugging whether it is possible to have a <b>user-specific breakpoint???</b> if so gimme idea how to make it???
Thanks in advanceABAP Debugger
The ABAP Debugger is an integrated test tool within the ABAP Workbench. You use it to check the program logic and to find errors in the source code of an ABAP program. In the Debugger, you can step through the source code of a program. The running program is interrupted after each step, allowing you to check its processing logic and the results of individual statements.
As of Release 6.10, you can also run Business Server Pages (BSP) in the debugging mode. You can also display and set breakpoints here. Business Server Pages can be displayed in the Object Navigator when you select an appropriate application under BSP Application.
Features
The Debugger provides an efficient means of identifying errors in ABAP programs. It contains the following functions:
Ways of starting the Debugger
Choosing different views
Choosing different execution options in the Debugger
Displaying source code in the Debugger
Setting and deleting breakpoints
Setting and deleting watchpoints
Stopping a program at a particular statement or event
Displaying and changing field contents at runtime
Displaying ABAP Objects and references
Displaying and positioning strings
Setting and deleting database locks
Opening the ABAP Editor, or Object Navigator
System settings and runtime warnings
Starting the Debugger
There are two possible strategies for starting the Debugger in the ABAP Workbench:
By setting breakpoints then running the program
By running the program in debugging mode.
Setting Breakpoints
A breakpoint is a signal in a line of code that tells the ABAP runtime processor to interrupt the program at that line and start the ABAP Debugger. A distinction is made between static and dynamic breakpoints. For further information about the different types of breakpoints and how to use them, refer to Breakpoints.
Running a Program in Debugging Mode
You can start the Debugger without previously having set breakpoints. This is the best procedure to use when you want to test a program right from the beginning. It is also useful if you do not know the program very well and therefore are not sure where best to set breakpoints. You can start the Debugger as follows:
From the Object Navigator Select a report or transaction and program and choose Program Test Debugging.
From the ABAP Editor Choose Program  Execute  Debugging (or the Debugging pushbutton).
From any screen Choose System  Utilities  Debug ABAP.
From any screen Enter " /h " in the command field.
Checking System Programs for Errors
To check a program or program component that is part of the ABAP Workbench (for example, the Screen Painter), you must use the system Debugger. To start the system Debugger, choose
System  Utilities  Debug system from any screen. To stop the system Debugger, choose Debugger  Debugging off.
Displaying Program Attributes
You can display the attributes Fixed point arithmetic, System program and Unicode checks active of the program that has just been executed by choosing Goto  Further Information  Program Attributes.
Display Modes in the Debugger
When you are debugging a program, there are various display modes that you can use. All of the display modes have the same structure. The top part of the screen displays an extract of the program source code. The bottom part displays the information specifically available in that display mode. There are also pushbuttons on the screen allowing you to switch to the most frequently-used display modes.
Display Modes Available Using Pushbuttons
Fields The scrollable field display contains the contents of up to eight fields. The contents of the three most important system fields are always displayed. This is the default display mode in the Debugger. See also Processing Fields
Table Displays the contents of an internal table. This mode allows you to display and edit the entries in an internal table. See also Processing Internal Tables
Breakpoints A scrollable display containing up to 30 breakpoints. Next to each breakpoint is a counter. You can also delete breakpoints in this display. See also Managing Dynamic Breakpoints
Watchpoints You can set a watchpoint for a field so that the program is interrupted whenever the value of that field changes. This display mode contains a list of watchpoints, the fields and programs to which they are assigned, the current values of the fields, and the conditions upon which the watchpoint is activated. See also Setting Watchpoints
Calls This mode displays the current sequence of events, and the sequence of calls up to the current breakpoint. The last active call is displayed at the top of the list; previous calls are listed in reverse chronological order. When an event (for example, START-OF-SELECTION) concludes, it is deleted from the display.
Overview This mode displays the structure of the program. It lists its events, subroutines, and modules, and shows which sections belong to which events. It also displays the section currently being processed.
Settings This mode displays the current Debugger settings. You can change the settings by selecting or deselecting various options. For further information, refer to Settings and Warnings
Other Display Modes
You can access other display modes by choosing Goto  Display data object.
Single field Displays the contents and technical attributes of a field.
Structured
field Displays the components of a structure, along with their contents and attributes. If you double-click a component, the system displays detailed information for it.
Strings Display the content and current length of the string. You can also display part of the content by means of offset and length.
Internal table Displays the type, line numbers and contents of an internal table.
Object Displays the structure of an ABAP Object.
For further information on these displays, refer to Displaying Attributes and Displaying ABAP Objects
Breakpoints
Instead of starting an ABAP program directly in the Debugger, you can also debug a program by creating one or more breakpoints in the program. A breakpoint is a signal at a particular point in the program that tells the ABAP runtime processor to interrupt processing and start the Debugger. The program runs normally until the breakpoint is reached.
There is also a special kind of breakpoint called a watchpoint. When you use watchpoints, the Debugger is not activated until the contents of a particular field change. For further information, refer to Watchpoints.
Breakpoint Variants
The Debugger contains different breakpoint variants:
Static The BREAK-POINT statement in an ABAP program. Static breakpoints are not normally user-specific. However, you can make them user-specific.
Directly-set
dynamic breakpoints Can be set in the ABAP Editor or the Debugger. Dynamic breakpoints are always user-specific, and are deleted when you log off from the R/3 System.
Breakpoint
at statement The Debugger stops the program directly before the specified statement is executed.
Breakpoint
at subroutine The Debugger stops the program directly before the specified subroutine is called.
Breakpoint at function module The Debugger stops the program directly before the specified function module is called.
Breakpoint at method The Debugger stops the program directly before the specified method is called.
Breakpoints at system exceptions The Debugger stops the program directly after a system exception, that is, after a runtime error has been intercepted.
Use
Static Breakpoints
Static breakpoints are not normally user-specific. Once a user has inserted a BREAK-POINT statement in an ABAP program, the system always interrupts the program at that point. You should only use static breakpoints during the development phase of an application. You should set static breakpoints whenever more than one programmer is working on the same program and you always want to stop the program in the same place.
Dynamic Breakpoints
Dynamic breakpoints are user-specific. You should, therefore, use them when you only want the program to be interrupted when you run it yourself. All dynamic breakpoints are deleted when you log off from the R/3 System.
Dynamic breakpoints are more flexible than static breakpoints, because you can deactivate or delete them at runtime. They have the following advantages:
You do not have to change the program code
You can set them even when the program is locked by another programmer
You can define a counter (for example, only activate the breakpoint after it has been reached five times).
Special Dynamic Breakpoints
Special dynamic breakpoints are useful when you want to interrupt a program directly before a particular ABAP statement, a subroutine, or an event, but do not know exactly where to find it in the program code. Event here is used to refer to the occurrence of a particular statement, for
example, or calling up a method. Special dynamic breakpoints are user-specific. You can only set them in the Debugger.
Transferring Breakpoints to HTTP and Update Sessions
If an HTTP or update session is called from a Logical Unit of Work (LUW), new work processes are started for these new sessions. Breakpoints that were defined beforehand in the calling LUW are copied to these sessions where they can be displayed under breakpoints.
If, for example, the update module func is called via CALL FUNCTION func IN UPDATE TASK, the new work process is displayed in a second window if Update debugging was selected under Settings in the debugging mode. All the breakpoints that were set in the calling LUW can then be processed here.
Static Breakpoints
You should only use static breakpoints during the development phase of an application. You must remove them from your program before you transport it.
Setting Breakpoints
To set a static breakpoint, use the ABAP statement BREAK-POINT . Place the breakpoint in the line at which you want to interrupt the program.
program RSDEBUG_01.
if SY-SUBRC <> 0.
break-point.
endif.
When you run the program, the runtime processor interrupts it when the breakpoints occur. You can number your breakpoints to make them easier to identify ( BREAK-POINT 1, BREAK-POINT 2 ).
Static breakpoints are not normally user-specific. The program is, therefore, always interrupted as soon as the runtime processor reaches the line containing the breakpoint. The program is interrupted regardless of the user who executes it.
However, you can set user-specific static breakpoints using the BREAK statement followed by your user name. For example, if you use the statement BREAK SMITH , the program is only interrupted when user Smith runs it. Although user-specific breakpoints appear in the program code, they are not active when other users run the program. You should, however, be careful if an application is being used by several users with the same name.
Deleting Breakpoints
Since static breakpoints apply to all users, you must remove them from the program once you have finished testing it. In the ABAP Editor, you can find breakpoints quickly by choosing Utilities  Global search. You can also use the Extended Program Check to find them.
If you do not remove static breakpoints from your program, they will be transported to your production system. This could cause serious problems in the production system.
Dynamic Breakpoints
You can set up to 30 dynamic breakpoints without changing the program code. Dynamic breakpoints can be set either in the ABAP Editor or directly in the Debugger.
Setting Dynamic Breakpoints in the ABAP Editor
You can set dynamic breakpoints in the ABAP Editor regardless of whether you are in display or change mode. You can also set breakpoints directly from within the Debugger at runtime. To set a dynamic breakpoint in the ABAP Editor:
1. Position the cursor on the line of the source code at which you want to set the breakpoint.
example, or calling up a method. Special dynamic breakpoints are user-specific. You can only set them in the Debugger.
Transferring Breakpoints to HTTP and Update Sessions
If an HTTP or update session is called from a Logical Unit of Work (LUW), new work processes are started for these new sessions. Breakpoints that were defined beforehand in the calling LUW are copied to these sessions where they can be displayed under breakpoints.
If, for example, the update module func is called via CALL FUNCTION func IN UPDATE TASK, the new work process is displayed in a second window if Update debugging was selected under Settings in the debugging mode. All the breakpoints that were set in the calling LUW can then be processed here.
Static Breakpoints
You should only use static breakpoints during the development phase of an application. You must remove them from your program before you transport it.
Setting Breakpoints
To set a static breakpoint, use the ABAP statement BREAK-POINT . Place the breakpoint in the line at which you want to interrupt the program.
program RSDEBUG_01.
if SY-SUBRC <> 0.
break-point.
endif.
When you run the program, the runtime processor interrupts it when the breakpoints occur. You can number your breakpoints to make them easier to identify ( BREAK-POINT 1, BREAK-POINT 2 ).
Static breakpoints are not normally user-specific. The program is, therefore, always interrupted as soon as the runtime processor reaches the line containing the breakpoint. The program is interrupted regardless of the user who executes it.
However, you can set user-specific static breakpoints using the BREAK statement followed by your user name. For example, if you use the statement BREAK SMITH , the program is only interrupted when user Smith runs it. Although user-specific breakpoints appear in the program code, they are not active when other users run the program. You should, however, be careful if an application is being used by several users with the same name.
Deleting Breakpoints
Since static breakpoints apply to all users, you must remove them from the program once you have finished testing it. In the ABAP Editor, you can find breakpoints quickly by choosing Utilities  Global search. You can also use the Extended Program Check to find them.
If you do not remove static breakpoints from your program, they will be transported to your production system. This could cause serious problems in the production system.
Dynamic Breakpoints
You can set up to 30 dynamic breakpoints without changing the program code. Dynamic breakpoints can be set either in the ABAP Editor or directly in the Debugger.
Setting Dynamic Breakpoints in the ABAP Editor
You can set dynamic breakpoints in the ABAP Editor regardless of whether you are in display or change mode. You can also set breakpoints directly from within the Debugger at runtime. To set a dynamic breakpoint in the ABAP Editor:
1. Position the cursor on the line of the source code at which you want to set the breakpoint.
You can use this kind of dynamic breakpoint to interrupt a program directly before a function module is called.
Prerequisites
You must already be running the program in the Debugger.
Procedure
To set a breakpoint for a function module:
1. Choose Breakpoint  Breakpoint at  Function module...
2. Enter the name of the function module before which you want to interrupt the program. The system sets a breakpoint wherever the specified event, module pool, or subroutine occurs in the program code.
3. Choose ENTER.
Result
If you entered a valid function module name, the system confirms that the breakpoint has been set. If the function module exists in the system, the new breakpoint is added to the display list.
Breakpoints at System Exceptions
You can use this special form of dynamic breakpoint to interrupt a program immediately after a runtime error has occurred.
Prerequisites
You must already be running the program in the Debugger.
Procedure
To set a breakpoint at a system exception:
Choose Breakpoint  Breakpoint at  System exception.
Result
The system confirms the breakpoint. The breakpoint is added to the breakpoints displayed.
When a system exception is triggered, a warning triangle appears in the line containing the statement that caused it. If you double-click the warning triangle, the internal name of the runtime error appears.
Saving Breakpoints
If you want to leave the Debugger temporarily, you can save your dynamic breakpoints so that they are still active when you return to the Debugger within the same terminal session.
To save the breakpoints that you have set in the Debugger:
Choose Breakpoint  Save.
The system saves all of the breakpoints that you have set in the current program. These breakpoints will remain active until you either explicitly delete them or log off from the system.
You can also delete breakpoints that you have saved:
By deleting individual breakpoints from the display and then saving again. In this case, only your selected breakpoints will be deleted.
By choosing Breakpoint  Delete all. In this case, the system deletes all dynamic breakpoints.
Managing Dynamic Breakpoints
The ABAP Debugger provides a convenient user interface for managing breakpoints. To open the breakpoint display, choose Breakpoints, or, from the menu, Goto  Control debugging  Breakpoints.
Functions
This display mode contains the following functions for breakpoints:
Breakpoint Display
The scrollable breakpoint display contains up to 30 dynamic breakpoints. For breakpoints that you set directly, the program name and line number at which the breakpoint occurs are displayed. For special breakpoint forms, the list displays the statements, events, subroutines, and module calls at which the relevant breakpoints are set.
Counter
In the breakpoint display, you can specify a counter. When you use a counter, the breakpoint is not activated until it has been reached a specified number of times. For example, if you enter 5 for the counter, the breakpoint is not activated until it is reached for the fifth time. After the breakpoint has been activated, it remains so, and the counter no longer appears in the breakpoint display.
Deleting Breakpoints
Position the cursor on the breakpoint that you want to delete, and either double-click the line or choose Breakpoint  Set/delete. To delete all breakpoints, choose Breakpoint  Delete all.
Activating and Deactivating Breakpoints
Position the cursor on the breakpoint that you want to activate or deactivate and choose Breakpoint  Activate/deactivate.
http://www.sap-img.com/abap/testing-and-debugging-abap-codes-functions.htm
http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/frameset.htm
For debugging tutorial:
http://help.sap.com/saphelp_erp2005vp/helpdata/en/5a/4ed93f130f9215e10000000a155106/frameset.htm
http://www.sapdevelopment.co.uk/tips/debug/debughome.htm
http://www.sap-basis-abap.com/sapab002.htm
Chaeck the following documents,
http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/84/1f624f4505144199e3d570cf7a9225/frameset.htm
http://help.sap.com/saphelp_bw30b/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
Hope you can get all the required information from the above documents.
Reward points if helpful. -
How to find the specifed user-exit
Hi, experts. i am first time to do enchancement. can anyone tell me how to find specifed user-exit. for example, how to find MV45AFZZ? Also, what i should pay attention to when doing enhancment works? thanks.
Hi Jrockman,
There are many things associated to user exit.
a) Tcode- CMOD. here you can find
b) USER-EXIT triggering points ->
Go to se93 and give the tcode to find the main program associated to it.
Go to se38 and give the main program.
Find the package associated to it.Go to->Object Directory Entry.
Go to smod transaction.
Press f4.
Press Information System Button.
Give the Project(Dev Class).
Press enter.
Find the enhancements associated
c) Check the code posted by me ,to get the list of User exits and Badi for a particular tcode in the link mentioned below.
Re: User Exit for IW22 - to populate custom fields
d) few useful links to understand User exits.
http://www.sapdevelopment.co.uk/enhance/enhancehome.htm
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sapgenie.com/abap/code/abap26.htm
http://www.sap-img.com/abap/what-is-user-exits.htm
http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
http://www.easymarketplace.de/userexit.php
http://www.sappoint.com/abap/userexit.pdf
ABAP Enhancements and Modifications - General
https://www.sdn.sap.com/irj/sdn/developerareas/abap?rid=/webcontent/uuid/2342e1f3-0b01-0010-a186-fdd404884050
Menu Exit
http://sap.ittoolbox.com/groups/technical-functional/sap-r3-dev/menu-exits-72696#
Screen Exit
http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
Hope it helps.
Manish -
Required User Exit Or Badi.
Hi Friends,
I am searching for the user exit or Badi .
The scenario is:- First i create a Purchase Requisition
in ME51N. After creating the PR, the transaction ME59 is run which automatically creates Purchase order from the PR. The automatic creation of PO from PR is done by the user exit or Badi.
Please tell me the Badi or user exit.
Points will given to useful response.
Regards,
Mandeep.Hi Mandeep, this is BADI for ME51N.
report ZUDAY_BDC_TCL1 no standard page heading line-size 255.
include bdcrecx1.
TABLES EBAN.
DATA: BEGIN OF ITAB OCCURS 0,
NUMBER(3) TYPE C,
MATNR LIKE EBAN-MATNR,
TXZ01 LIKE EBAN-TXZ01,
MENGE(13) TYPE C,
MEINS LIKE EBAN-MEINS,
EEIND TYPE RM06B-EEIND,
EKGRP LIKE EBAN-EKGRP,
MATKL LIKE EBAN-MATKL,
WERKS(4) TYPE C,
END OF ITAB.
DATA: LVALUE TYPE I,
COUNT TYPE I,
TEMP(20) TYPE C,
CTRL TYPE I,
CTRL1(3) TYPE C,
PAGES(5) TYPE c VALUE '10',
PVALUE(3) TYPE C VALUE 0.
start-of-selection.
PERFORM GETDATA.
SORT ITAB BY NUMBER.
perform open_group.
LOOP AT ITAB.
IF ITAB-NUMBER <> LVALUE.
COUNT = 0.
perform bdc_dynpro using 'SAPMM06B' '0100'.
perform bdc_field using 'BDC_CURSOR'
'EBAN-BSART'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'EBAN-BSART'
'NB'.
perform bdc_field using 'RM06B-LPEIN'
'T'.
perform bdc_field using 'EBAN-EKGRP'
'008'.
perform bdc_dynpro using 'SAPMM06B' '0106'.
perform bdc_field using 'BDC_CURSOR'
'EBAN-MATNR(01)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
PAGES = 10.
CTRL = 0.
LOOP AT ITAB WHERE NUMBER = ITAB-NUMBER.
CTRL = CTRL + 1.
IF CTRL >= 19.
PAGES = PAGES + 10.
ENDIF.
CTRL1 = CTRL.
IF CTRL >= 19.
CTRL1 = '19'.
ENDIF.
IF CTRL >= 10.
PVALUE = ''.
ENDIF.
perform bdc_field using 'RM06B-BNFPO'
PAGES.
Concatenate 'EBAN-MATNR(' PVALUE CTRL1 ')' into Temp.
CONDENSE Temp NO-GAPS.
perform bdc_field using Temp itab-MATNR.
Concatenate 'EBAN-TXZ01(' PVALUE CTRL1 ')' into Temp.
CONDENSE Temp NO-GAPS.
perform bdc_field using Temp itab-TXZ01.
Concatenate 'EBAN-MENGE(' PVALUE CTRL1 ')' into Temp.
CONDENSE Temp NO-GAPS.
perform bdc_field using Temp itab-MENGE.
Concatenate 'EBAN-MEINS(' PVALUE CTRL1 ')' into Temp.
CONDENSE Temp NO-GAPS.
perform bdc_field using Temp itab-MEINS.
Concatenate 'RM06B-EEIND(' PVALUE CTRL1 ')' into Temp.
CONDENSE Temp NO-GAPS.
perform bdc_field using Temp itab-EEIND.
Concatenate 'EBAN-EKGRP(' PVALUE CTRL1 ')' into Temp.
CONDENSE Temp NO-GAPS.
perform bdc_field using Temp itab-EKGRP.
Concatenate 'EBAN-MATKL(' PVALUE CTRL1 ')' into Temp.
CONDENSE Temp NO-GAPS.
perform bdc_field using Temp itab-MATKL.
Concatenate 'EBAN-WERKS(' PVALUE CTRL1 ')' into Temp.
CONDENSE Temp NO-GAPS.
perform bdc_field using Temp itab-WERKS.
perform bdc_dynpro using 'SAPMM06B' '0102'.
perform bdc_field using 'BDC_CURSOR'
'EBAN-MENGE'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'EBAN-TXZ01'
ITAB-TXZ01. "'HD GLAD BOY tank silver'.
perform bdc_field using 'EBAN-MENGE'
ITAB-MENGE. "'500'.
perform bdc_field using 'RM06B-EEIND'
ITAB-EEIND."'27.06.2007'.
perform bdc_field using 'EBAN-EKGRP'
ITAB-EKGRP. "'001'.
perform bdc_field using 'EBAN-BADAT'
'15.06.2007'.
perform bdc_field using 'EBAN-FRGDT'
'26.06.2007'.
perform bdc_field using 'EBAN-PREIS'
'55.48'.
perform bdc_field using 'EBAN-WAERS'
'GBP'.
perform bdc_field using 'EBAN-PEINH'
'1'.
perform bdc_field using 'EBAN-REPOS'
'X'.
perform bdc_dynpro using 'SAPMM06B' '0106'.
Concatenate 'ElBAN-MATNR(' PVALUE CTRL1 ')' into Temp.
CONDENSE Temp NO-GAPS.
perform bdc_field using 'BDC_CURSOR' Temp.
perform bdc_field using 'BDC_OKCODE'
'/00'.
ENDLOOP.
LVALUE = ITAB-NUMBER.
perform bdc_dynpro using 'SAPMM06B' '0106'.
perform bdc_field using 'BDC_CURSOR'
'RM06B-BNFPO'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_field using 'RM06B-BNFPO'
'80'.
*AT END OF NUMBER.
perform bdc_transaction using 'ME51'.
REFRESH BDCDATA.
*ENDAT.
ENDIF.
ENDLOOP.
perform close_group.
*& Form GETDATA
text
--> p1 text
<-- p2 text
FORM GETDATA .
CALL FUNCTION 'UPLOAD'
EXPORTING
FILENAME = ' '
FILETYPE = ' '
TABLES
DATA_TAB = ITAB
EXCEPTIONS
CONVERSION_ERROR = 1
INVALID_TABLE_WIDTH = 2
INVALID_TYPE = 3
NO_BATCH = 4
UNKNOWN_ERROR = 5
GUI_REFUSE_FILETRANSFER = 6
OTHERS = 7
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " GETDATA.
kindly reward if found helpful.
cheers,
Hema. -
BAPI , BADI , USER EXIT , FUNCTION MODULE
Hi Experts
Can any body pls explain me abt BAPI , BADI , USER EXIT , FUNCTION MODULE and its uses in details .
Thanks
DevashishDear Deba,
Functional Module:Procedure that can only be defined in function groups and outside of classes. Can be called from all
programs. Begins with FUNCTION and ends with ENDFUNCTION. Is maintained using the Function Builder of the ABAP
Workbench.
Functional Module can be checked using T Code SE37 for a package ,say in standard SAP CS15 will be used for checking
the where used list for a material and here it can be checked only for one material,in case if we want to check for a list of
materials a small report can be developed using the fucntional modules like
CSEP_MAT_BOM_SELECT_WHERE_USED API Bills of Material: Select BOM(s) (or)
CS_WHERE_USED_MAT Bills of material; where-used list
User Exit:A point in an SAP program where a customer's own program can be called.
In contrast to customer exits, user exits allow developers to access and modify program components and data objects in the
standard SAP System. On upgrade, each user exit must be checked to ensure that it conforms to the standard system.
There are the following types of user exit:
User exits that use INCLUDEs - These are customer enhancements that are called directly in the program.
User exits that use tables - these are used and managed using Customizing.
User Exits can be viewed or checked using the T Code SMOD and using CMOD an user exit will be activated.
BAdi:
A template for BAdI objects.
Business Add-Ins (BAdIs) are the basis for enhancements where BAdI methods in object plug-ins can be called from ABAP
programs. The calling program controls which BAdI implementations are used by specifying filter values. A BAdI consists of a
BAdI interface, a set of filters and some settings.
From Release 7.0, BAdIs are edited in the Enhancement Builder and reside in the global class namepsace. You can switch on
their implementations via the Switch Framework.
There are also classic BAdIs, which are edited in the BAdI-Builder and superseded function module exits in Release 4.6.
Related T Code SE18.
Regards
Mangalraj.S -
User exits for production order
Hello,
Hope all had good weekend. I need some help and would appreciate if someone can guide me here.
I have a requirement where I need to develop an enhancement point for production orders transaction CO02.
The enhancement will check the user's authorization profile. Based on authorization profile, enhancement point will decide and direct 'CO02-Change production Order' OR 'ZCO02 - restricted production orders'.
Here are few question I have related.
1. What user exit I should use for this above requirement ? This should be triggered whenever CO02 is being called either from SAP easy access menu or from a different transaction.
2. How can I check/read users authorization profile within this user exit/enhancement point ?
3. Based on the profile, how do I direct to CO02 or ZCO02 ?
Will highly appreciate if someone could please share their knowledge on this.
Thanks,
JMCHi J,
can u tell me whats there in ZCO02 - restricted production orders', have u seen SHD0 -->creating screen/transaction variants ?
Disabling tabs in SHD0
Regards
Prabhu -
Brazil: User Exit in RFFOBR_A
Hi everybody,
When running program RFFOBR_A to generate a CNAB payment medium we want to add the Boleto number in field J_1BDMEZA-A11 (Nosso Numero). At this time it is '0' but we want it to be populated with the next check lot number in order to be able to use the payment file for Boleto printing. Does anybody know a user Exit / enhancement point that can be used to populate this field?
Thanks in advance!
Best regards,
AlexAlexander Bösel,
you don`t need to create user exit to populate "nosso número".
There is a standard algorithm in Brazilian Localization.
1 - Make sure the following fields are defined in OB32 - Document change rules.
D
BSEG-XREF1
Chave referência 1
D
BSEG-XREF2
Chave referência 2
D
BSEG-XREF3
Chave referência 3
2 - Check FEBRABAN Layout Description code C044 - Código de Movimento Retorno as external operation: '02' = Entrada Confirmada (1st Bank Advice upload)
3 - Enter OT51 and define processing type and external operation: Brazil: enter document with brazilian data
Best Regards -
Hi,
what is the user exit used and what is the requirement.
Thi s was a ninterview question .
What would be the best answerHi Soumya,
Check out the following links for user exits
Reward points if helpful.
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci982776,00.html -
USER EXIT/BADI for blocking pop up in VA01/VA02 for unloading point
Hi,
Please see details below with an example
Following the below steps will execute the popup.
1. VA01 (Sales Doc Create)
Document type can be anything.This pop-up should be blocked for 'CRQ' and 'CR' types.
2. Input CRQ or CR in the Order Type field and execute.
3. Within the document:
Input customer 194 as the Sold-to and Ship-to parties
Input the PO Date field with todays date
Input material 475410m and a Target Quantity of 1
Press Enter
If the ship-to party has more than one unloading point a pop up would show both values to choose one(these values come from KNVA-ABLAD).
The code details are as follows:
Program SAPMV45A--> Include MV45AF0K_KUAGV_SELECT---->CALL FUNCTION 'VIEW_KUAGV'
2)CALL FUNCTION 'VIEW_KUAGV' uses CALL FUNCTION 'SD_PARTNER_SINGLE_MODIFY' for ship-to(WE)
3) IN FM 'SD_PARTNER_SINGLE_MODIFY' the following sub-routine is called:
*-- proceed inserting a partner -
create a new xvbpa-segment
PERFORM XVBPA_ENTRY_FILL USING LVF_VKORG LVF_VTWEG LVF_SPART
LVF_VBELN
fif_posnr
LVF_KUNNR_NEW
FIF_MANUAL_ADDRESS
FIF_MANUAL_ADDRESS_ORIGIN
FIF_PARVW FIF_PARGR
LVF_PARTNER_USER
FIF_KNREF_PARNR
FIF_PRFRE
FIF_BOKRE
FIF_HISTUNR
FIF_HZUOR
FIF_NO_DIALOG
LVT_XVBADR
LVF_ACTION_TODO
LVS_OLD_XVBPA-CNTPA
CHANGING LVS_NEW_XVBPA
LVT_XVBPA.
4)This subroutine uses FM 'SD_PARTNER_ABLAD_SELECTION' to determine unloading points for ship-to and also brings up the pop-up using 'REUSE_ALV_POPUP_TO_SELECT'.
partner is ship-to, so determinate unloading point
CALL FUNCTION 'SD_PARTNER_ABLAD_SELECTION'
EXPORTING
FIF_KUNNR = LVS_XVBPA-KUNNR
FIF_NO_DIALOG = LVF_NO_DIALOG
IMPORTING
FES_KNVA = LVS_KNVA
EXCEPTIONS
NO_UNLOADING_POINT = 1
NO_SELECTION_DONE = 2
OTHERS = 3.
LVS_XVBPA-ABLAD = LVS_KNVA-ABLAD.
Any help in this regard is highly appreciated.
Sincere Regards,
Sai.Have a look at below link which gives the details abt the user exits related to VA01/VA02.
http://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/content.htm
Best Regards,
Vibha
*Please mark all the helpful answers -
User Exit/BADI/Enhancement Point in VF01 before new document no assignment
Hi Expert,
I am looking for a user exit/BADI/Enhancement point which will trigger in VF01 before the new document no (Billing document no assign).
I need to cross check few things in Billing via VF01 at billing document save and give error message accordingly. The problem is if new number assign and there is error due to my code then when user save the document next he get a new no. its mean a no skip.
Example: The invoice no is 1000. User start creating a billing document with Vf01 and he get an error message due to my code at exit , at this point of time the next number assign to billing which is 1001 but document not save due to my error message. Now after applying correction user save data and billing document created with no 1002. So there is no skip.
I tried BADI BADI_SD_ACCOUNTING but this will trigger after no assignment. Can someone provide me a user exit/BADI/Enhancement point in VF01 which trigger before no range assignment and contain at least Billing header data to use in my code?
Regards
Swati
Edited by: Swati Namdev on Nov 16, 2010 9:55 PMHI Brad and team,
BRED is right. I check few user exit normally all of us have that list or easily available on net.
BRED: my question is: I need to check the billing date VBRK-FKDAT of document should not be less than the sales order plan billing date VBAP-Oldate.
If this check fail then won't allow the user to create billing document. The problem is I used one user exit SDVFX001 already define previously that's work fine but issue is that user exit trigger after the billing no assignment. That's why when user get that error message he correct the document and create billing this time he get a new number which is skip of one no.
That why I need a User Exit/BADI/Enhancement Point which trigger at save but before document no assignment.
Please update more about your comment "Why not use a header level copy requirement routine to perform the checks and log the messages? This is the standard process." .
Suggest user exit USEREXIT_FILL_VBRK_VBRP trigger before save. I need at save the reason is VBRK-FKDAT this can be change.
Feel free to contact me back if you need more clarification.
Regards
Swati
Edited by: Swati Namdev on Nov 17, 2010 6:22 PM
Edited by: Swati Namdev on Nov 17, 2010 6:25 PM
Edited by: Swati Namdev on Nov 17, 2010 6:32 PM
Edited by: Swati Namdev on Nov 17, 2010 6:47 PM
Maybe you are looking for
-
I just bought the new "The Pack" album and it said "explicit" on it but it is totally censored. There are two of the same albums but one of them is probably the clean version even though it says explicit lyrics. How can I get my money back so I can p
-
Poor quality when rendering CC Particle Systems II
Hi Guys. I'm getting strange render results when I render out CC Particle Systems II cubes and tetrahedrons. I have the particles cascading out towards the viewer and they look great when I preview render in AFX but when I do a full render to H.264 m
-
If not with Finder, is there some other way to do it simply with Mountain Lion OS?
-
How to handle "ok" and "cancel" button of dialog popup?
Hello everyone, I'm using a dialog with type="okCancel". My question is how to handle ok and cancel button of this popup window. Here is my code below: <af:popup id="kriterPopup"> <af:dialog title="Kriter Seçiniz" type="okCancel" inlineStyle="width:5
-
What is this gui component?
HI all, I'm writing a program and I wish to use a gui component but I don't know what it is called and I was wondering if any of you could help. Its kind of like a text area but the text is separated into columns and each of the columns have headings