Reg: can anyone plz help me finding a badi for FB01

hi..,
   My requirement is to capture the profit center & change it w.r.to the profit center available in purchase order while posting a documet in FB01. iam trying to find a badi for this.. can anyone plz suggest me, how to proceed??? this is the first time iam dealing with badi's...

just run this program u find badi related to transaction.
*& Report  ZNEGI16                                                     *
REPORT  ZNEGI16                                 .
TABLES : TSTC,
TADIR,
MODSAPT,
MODACT,
TRDIR,
TFDIR,
ENLFDIR,
SXS_ATTRT ,
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,
P_PGMNA LIKE TSTC-PGMNA .
DATA wa_tadir type tadir.
START-OF-SELECTION.
IF NOT P_TCODE IS INITIAL.
SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.
ELSEIF NOT P_PGMNA IS INITIAL.
TSTC-PGMNA = P_PGMNA.
ENDIF.
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 in ('SMOD', 'SXSD')
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:/(105) SY-ULINE.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
* Sorting the internal Table
sort jtab by OBJECT.
data : wf_txt(60) type c,
wf_smod type i ,
wf_badi type i ,
wf_object2(30) type C.
clear : wf_smod, wf_badi , wf_object2.
* Get the total SMOD.
LOOP AT JTAB into wa_tadir.
at first.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
WRITE:/1 SY-VLINE,
2 'Enhancement/ Business Add-in',
41 SY-VLINE ,
42 'Description',
105 SY-VLINE.
WRITE:/(105) SY-ULINE.
endat.
clear wf_txt.
at new object.
if wa_tadir-object = 'SMOD'.
wf_object2 = 'Enhancement' .
elseif wa_tadir-object = 'SXSD'.
wf_object2 = ' Business Add-in'.
endif.
FORMAT COLOR COL_GROUP INTENSIFIED ON.
WRITE:/1 SY-VLINE,
2 wf_object2,
105 SY-VLINE.
endat.
case wa_tadir-object.
when 'SMOD'.
wf_smod = wf_smod + 1.
SELECT SINGLE MODTEXT into wf_txt
FROM MODSAPT
WHERE SPRSL = SY-LANGU
AND NAME = wa_tadir-OBJ_NAME.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
when 'SXSD'.
* For BADis
wf_badi = wf_badi + 1 .
select single TEXT into wf_txt
from SXS_ATTRT
where sprsl = sy-langu
and EXIT_NAME = wa_tadir-OBJ_NAME.
FORMAT COLOR COL_NORMAL INTENSIFIED ON.
endcase.
WRITE:/1 SY-VLINE,
2 wa_tadir-OBJ_NAME hotspot on,
41 SY-VLINE ,
42 wf_txt,
105 SY-VLINE.
AT END OF object.
write : /(105) sy-ULINE.
ENDAT.
ENDLOOP.
WRITE:/(105) SY-ULINE.
SKIP.
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE:/ 'No.of Exits:' , wf_smod.
WRITE:/ 'No.of BADis:' , wf_badi.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(105) 'No userexits or BADis exist'.
ENDIF.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(105) 'Transaction does not exist'.
ENDIF.
AT LINE-SELECTION.
data : wf_object type tadir-object.
clear wf_object.
GET CURSOR FIELD FIELD1.
CHECK FIELD1(8) EQ 'WA_TADIR'.
read table jtab with key obj_name = sy-lisel+1(20).
move jtab-object to wf_object.
case wf_object.
when 'SMOD'.
SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
when 'SXSD'.
SET PARAMETER ID 'EXN' FIELD SY-LISEL+1(20).
CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
endcase.

Similar Messages

  • I am currently getting finder error screen saying "Quartz-filter plugin" error, Please report to apple. Can anyone please help me find a resolution for this error?

    I am currently getting finder error screen saying "Quartz-filter plugin" error, Please report to apple. Can anyone please help me find a resolution for this error?

    If it were me I would schedule an appointment at the store where you bought it and meet with the Manager of the store in person. Print this post and bring it with you along with your iMac.
    And change the password on your Apple ID and then see if there are in purchases in your account that you did not make. If there are then someone did get your ID and password. If not someone got your Credit Card information from somewhere and used it.

  • Can anyone plz help me !!!!!!!!

    This is the error i had while compiling my program...
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
         at function.MyFunc.y1(MyFunc.java:93)
         at function.DiagramPanel.paintComponent(DiagramPanel.java:94)
         at javax.swing.JComponent.paint(Unknown Source)
         at javax.swing.JComponent.paintChildren(Unknown Source)
         at javax.swing.JComponent.paint(Unknown Source)
         at javax.swing.JComponent.paintChildren(Unknown Source)
         at javax.swing.JComponent.paint(Unknown Source)
         at javax.swing.JLayeredPane.paint(Unknown Source)
         at javax.swing.JComponent.paintChildren(Unknown Source)
         at javax.swing.JComponent.paintToOffscreen(Unknown Source)
         at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
         at javax.swing.RepaintManager.paint(Unknown Source)
         at javax.swing.JComponent.paint(Unknown Source)
         at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
         at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
         at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
         at java.awt.Container.paint(Unknown Source)
         at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
         at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
         at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
         at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    can anyone plz help me to find a solution

    This actually appears to be an error when you are running your program. It appears you have something you need to fix at line 93 of MyFunc.java. I can't help much more unless I can see some code.

  • HI, i m new as a muze user for website creation. can anyone plz help me how to start this.

    HI, i m new as a muze user for website creation. can anyone plz help me how to start this.

    How exactly did you shut down your laptop? Not a hard restart (holding down the power button), I hope... if that's the case, then it is extremely unlikely the file is still intact on your computer. If it is, it would be an image on your RAM, and it is time-and-resource-intensive to recover it if it is even there. RAM memory is disposable and always being written over. Sorry dude...
    If it wasn't a hard restart, Keynote should have made a backup, unless you 'Force Close'd it.
    It really all depends on how your mac was shut down.

  • Can you plz help me finding a document on Error Re-start in transactions

    Hi everybody
    Can you plz.. help me find out a good documentation of Error Restart so that I will be able to know some more about it.
    Here, by error restart i want to say that like when we are fetching 5 lac records and by chance our transaction disrupts somehow then we don't want to start the transactions all over again we just want to start it from the point where it terminated.
    Thanks & Regards
    Peeyush

    Suppose I have 5 to 10 lac records
    and after say 2 hrs somehow the transaction of copying data from one table to another got disrupted some how
    now when I want to restart the transaction I want it to start from the record where it left off
    I am newbie sir so I would request you to give me a document which will give knowledge from head to toe regarding transaction management and the query I've asked.

  • I was given an ifone 5s that was purchased 3rd hand with an apple id.. I have no idea who the previous owner was.. Can anyone plz help with that issue?? I want to delete the apple id and create a new one????

    HOw can i delete the apple ID that came on a iphone 5s that was purchased 3rd hand and given as a gift to me... Thank you very much for your time and assistance in this mAtter..

    You can’t, and Apple won’t do it for you; the activation lock is an anti-theft measure. Try getting a refund for it.
    (123834)

  • Plz help to find dolby driver for my laptop

    i cannot find the suitable Dolby Advanced Audio Driver for my HP laptop that contains the powerful ALTEC LANCING Speakers.can anyone help me to find the latest driver for my device.plz anyone provide the link for download.

    Thats odd unless its a Windows 9x system lol. You shouldn't need drivers for USB storage devices. They are designed to identify themselves as Mass Storage class devices which will run with the built in drivers after Windows 98.  Occasionally you will get a device that have deliberately been designed to not meet the standards (for extra features) but you saying this happens with other USB devices says this isn't the case.
    Does it only happen with storage devices? Like hard drives, flash drives etc?
    The model and windows version shouldn't make much of a difference in this case but it doesn't hurt to know what kind of system you are using.
    Look up the USB controller in your system, if there are drivers for that, download them. If it's an already Windows supported device there is no need to download anything for it (have your Windows disc handy if you use XP) then uninstall the USB controller from the Windows Device Manager using the option to remove the drivers as well if the option is there.  Restart and let Windows find the USB controller and install it (and any other devices attached to the USB bus). You may find your keyboard, mouse and any other USB devices won't work until Windows has finished installing them.  Just give it some time, Windows will get there.

  • HT5934 I keep getting an error message when trying to instal is7 in my iPad 2 .  Can anyone pls help . I lost wifi for a white during the installation ...

    Hello
    Can anyone assist me with installing ios7 on my ipad2 please ?

    laleh08 wrote:
    Hello
    Error message is "unable to install update " "an error occurred during installing IOS7 "'
    Can you assst ?
    Ooof...  I hate those super-generic messages.  If I were in your shoes, I'd start all over again with a new download.  My WAG is that your first download was corrupted.

  • I can't remember my secret questions answer and I am so confused I tried all the ways but it's not Woking can anyone please help to find out how

    I really appreciate your help, it's really urgent need?

    The Three Best Alternatives for Security Questions and Rescue Mail
        1. Use Apple's Express Lane.
              Go to https://expresslane.apple.com ; click 'See all products and services' at the
              bottom of the page. In the next page click 'More Products and Services, then
              'Apple ID'. In the next page select 'Other Apple ID Topics' then 'Forgotten Apple
              ID security questions' and click 'Continue'. Please be patient waiting for the return
              phone call. It will come in time depending on how heavily the servers are being hit.
         2.  Call Apple Support in your country: Customer Service: Contacting Apple for support or
              Apple ID- Contacting Apple for help with Apple ID account security. Ask to speak to
              Account Security.
         3.  Rescue email address and how to reset Apple ID security questions.
    How to Manage your Apple ID: Manage My Apple ID

  • Can anyone please help me with the logic for this..

    hi all,
    os  has the value Windows 2000
    IF os CP 'WINDOWS' OR os CP 'SUN'.
         OS1 = 'X'.
      ENDIF.
    (if i test this,
    os1 doesnot have any value, (should be x)).
    This doesnot work for me.
    Any suggestions.
    Regards,
    Sukumar.

    Dear Sukumar,
    just use the F1 help on CP in ABAP code, there is a description.
    I think you need to use the asterix '*' than it will work.
    Regards
    Tibor
    Just check the example:
    Report z_example.
    data: os1, os type string.
    os = 'WINDOWS 2000'.
    IF os CP 'WINDOWS' OR os CP 'SUN' or os = space.
    OS1 = 'X'.
    ENDIF.
    write: / os1.

  • My iPod was stolen and insurance company want it's serial number before replacing it. They have advised iTunes stores this information as a device connected to iTunes. Can anyone advise how I find this information?

    IiPod serial number stored in iTunes, can anyone advise how I find this information for my insurance company?

    Juliebathgate wrote:
    IiPod serial number stored in iTunes, can anyone advise how I find this information for my insurance company?
    Hi,
    If you have made a backup at any time of your iPod in iTunes, it should be in Preferences, under Devices tab.
    In iTunes
    Open iTunes Preferences.
    From the Preferences window click on the Devices.
    Once you are there you should see a list under "Device Backups:".
    Hover your mouse pointer to the device and in a little while it should display the serial number of the device (with an iPhone it will also display a phone number used with it and the IMEI code and with an iPad it will display the IMEI in addition to the serial number).
    A pircture of where it can be found: http://km.support.apple.com/library/APPLE/APPLECARE_ALLGEOS/HT4946/en_US/HT4946- devices-iphone-001-en.png

  • I have been using GRAB to capture screen displays.  It has just stopped working since the last OSX Upgrade.  Can anyone, please help restore functionality?

    I have been using GRAB to capture screen displays.  It has just stopped working since the last OSX Upgrade.  Can anyone, please help restore functionality?

    Thanks for that.  I did as suggested but when I tried again, it still did not work.  Another  com.apple.Grab.plist appeared in the Library.
    I now have the following files in Library
    file://localhost/Users/peterpatel/Library/Preferences/com.apple.Grab.LSSharedFil eList.plist
    file://localhost/Users/peterpatel/Library/Preferences/com.apple.Grab.LSSharedFil eList.plist.lockfile
    file://localhost/Users/peterpatel/Library/Preferences/
    file://localhost/Users/peterpatel/Library/Preferences/com.apple.Grab.plist.lockf ile
    What do you suggest I do now?

  • I was trying to put music to my iPhone, but my iTunes don't recognize my iPhone. I tried to restart my iPhone, iMac, reinstalled iTunes..but still not working. can anyone please help?

    i was trying to put music to my iPhone, but my iTunes don't recognize my iPhone. I tried to restart my iPhone, iMac, reinstalled iTunes..but still not working. can anyone please help?

    This forum is for questions from those managing sites on iTunes U, Apple's service for colleges and universities to post educational material in the iTunes Store. You'll be most likely to get help with this issue if you ask in the general iTunes or iPhone forums.
    Regards.

  • My ipod 160g has a memory but says no files except 4 standard games, resets but still no files, Can anyone please help?

    my ipod 160g has a memory but says no files except 4 standard games, resets but still no files, Can anyone please help?

    What is displayed for the different types of storage (such as Music, Movies, Other, etc) under Settings -> About?
    B-rock

  • Hi when i open my application folder, all the application is shown in trash folder. when i click the application it says this app is in trash first move it out. and when i try to open through finder go it says this file doesn't exist. can some1 plz help?

    hi when i open my application folder, all the application is shown in trash folder. when i click the application it says this app is in trash first move it out. and when i try to open through finder> go it says this file doesn't exist. can some1 plz help? how can i put all my application through application folder?

    Something really odd is going on. In your first screen shot, I noticed that the Applications folder does not have the proper icon displayed in the side bar. Also, in the title bar it lists it as Applications 08-59-29-909.
    Not sure where it's picking up that odd name, unless it's because it's still truly within the Trash folder.
    Try this. In the Finder > Preferences > General > turn on "Always open folders in a new window". (I have a feeling you have the default setting with this off).
    Now, in Finder > Go > move down and open the Applications Folder from there. Now open the folder where you see all your applications that you show in your screen shot, select all, and move them to this true appliactions folder.
    This is what you should properly seeing (but with different apps listed):
    See how the Applications folder has the icon of the letter A shaped with a pencil, ruler & pen.

Maybe you are looking for

  • Como generar una factura de clientes con lotes

    Como Generar Una factura de Clientes con lotes, es Decir buscas? Busca otros Una Lista de Materiales Con Todos SUS Hijos, Tener pecado Una generada Orden de venta. Mi codigo es el siguiente, en solitario ingreso CUANDO Que El artículo De Una Lista de

  • How to write all metadata changes to picture files

    I created a catalog and started entering keywords and other data prior to learning about the "Automatically write changes into XMP" option in "Edit / Catalog Settings / Metadata".  I then enabled the option because I want all metadata to be stored wi

  • Some build specifications change on different machines

    Hi all, I often need to move my LabVIEW projects from a machine to another one. In this cases, I copy all the contents of my project folder in the new machine. My projects are built without errors, but some build specifications are not kept. Build sp

  • PDF in bestimmter Reihenfolge zusammenführen

    Moin, Moin und Gruß aus Hamburg! Sorry das ich meine Anfrage hier nur in deutsch stellen kann, aber mit englisch kann ich leider nicht dienen. Wir setzen in der Firma den Acrobat 9 ein um Dokumente zu scannen und zu archivieren. Gescannt wird mit dem

  • Problem with Bridge users is not fixed

    Hi, This problem was reported before and I want to tell you that it is still there. In the forum's threads list I would see number of replies 1 but the last user's name is OP. Only opening the thread I would find new Erland's reply. I also do not see