Using BAPI_PR_CREATE , but failed to overwrite the item short text

As I want to create PR items and rewrite the items' short text,
even if i have give the short_text some  values ,
but it still to be the default value after the PR items created.
The following is main part of my program using BAPI  'BAPI_PR_CREATE' to create PR:
     w_pritem-material = t_in-matnr.
      perform frm_add_zero using w_pritem-material.
     W_PRITEM-PREQ_ITEM = SY-TABIX.
      w_pritem-preq_item = l_tabix.
      perform frm_add_zero using w_pritem-preq_item.
      w_pritem-acctasscat = t_in-knttp.
      w_pritem-plant = t_in-werks.
     W_PRITEM-STORE_LOC = '1003'.
      w_pritem-quantity = t_in-menge.
      w_pritem-SHORT_TEXT = t_in-txz01.
      append w_pritem to t_pritem.
      w_pritemx-preq_item = w_pritem-preq_item.
      w_pritemx-material = 'X'.
      w_pritemx-preq_itemx = 'X'.
      w_pritemx-acctasscat = 'X'.
      w_pritemx-plant = 'X'.
     W_PRITEMX-STORE_LOC = 'X'.
      w_pritemx-quantity = 'X'.
        w_pritemx-SHORT_TEXT = 'X'.
      append w_pritemx to t_pritemx.
    call function 'BAPI_PR_CREATE'
        exporting
            prheader = w_prhead
            prheaderx = w_prheadx
        importing
            number =  l_prnum
        tables
            return =  t_return
            pritem =  t_pritem
            pritemx = t_pritemx
            praccount = t_praccount
            praccountx = t_praccountx
            pritemtext = t_pritemtext
Ivan Yang

Now I try to use 'BAPI_REQUISITION_CREATE'  to instead of 'BAPI_PR_CREATE'.
But it still fail , it always give a error message like that 'No direct postings can be made to G/L acct.'.
Pls note that the ACCTASSCAT is setted to be 'M' , and I am sure that all the data entries can generate a PR without problem
while using 'BAPI_PR_CREATE'.
Following is the main part of my program:
PR_ITEM-DOC_TYPE   = T_in-BSART.
PR_ITEM-PREQ_ITEM  = l_tabix.
perform frm_add_zero using PR_ITEM-PREQ_ITEM.
  PR_ITEM-ACCTASSCAT = 'M' .
PR_ITEM-MATERIAL = t_in-MATNR.
  perform frm_add_zero using PR_ITEM-MATERIAL.
      if t_in-txz01 is not initial.
        PR_ITEM-SHORT_TEXT = t_in-txz01.
      endif.
    PR_ITEM-QUANTITY  = T_IN-MENGE.
    PR_ITEM-DELIV_DATE = '20090801'. 
    PR_ITEM-PLANT  = T_IN-WERKS.
    PR_ITEM-PREQ_DATE = '20090801'.
    APPEND PR_ITEM.
    PR_ACCOUNT-PREQ_ITEM = PR_ITEM-PREQ_ITEM.
    PR_ACCOUNT-G_L_ACCT = T_IN-SAKNR.  
    PR_ACCOUNT-SERIAL_NO = 1.
     PR_ACCOUNT-CO_AREA =  'XXX'.
      PR_ACCOUNT-PREQ_QTY = t_in-MENGE.
      PR_ACCOUNT-sd_doc = t_in-vbeln.
      perform frm_add_zero using PR_ACCOUNT-sd_doc.
      PR_ACCOUNT-SDOC_ITEM = t_in-posnr.
      perform frm_add_zero using PR_ACCOUNT-SDOC_ITEM.
    APPEND PR_ACCOUNT.
    CLEAR PR_ACCOUNT.
     CLEAR PR_ITEM.
CALL FUNCTION 'BAPI_REQUISITION_CREATE'
EXPORTING
  SKIP_ITEMS_WITH_ERROR                =
  AUTOMATIC_SOURCE                     = 'X'
       IMPORTING
         NUMBER                               = l_prnum
        TABLES
          REQUISITION_ITEMS                    = PR_ITEM
          REQUISITION_ACCOUNT_ASSIGNMENT       = PR_ACCOUNT
          RETURN                               = PR_RETURN
Ivan Yang

Similar Messages

  • Change PR item short text when created from Work Order

    Hello,
    Is there a way to edit the PR item short text when the PR is generated from a Work Order. When we open the PR, the item short text is grayed out.
    We have created Material Master Number for Contract/ BPA items. When we input that particular material number under the components tab on the WO then release it ,it creates a PR. The Material Master description gets transfered to the PR.
    Our issue is that the Material Master is to generic and we would like to change the description on the PR level.
    Is this possible?
    Thanks,

    Hi
    I think neither there is any way to change the Material Description in PR nor its a good SAP Practise as it is having lot of implecations of stocking , physical inventory , reconciliation etc .
    If Item codes are generic suggest if u can use the PR or PO long text to enable the buyer for the procurement & supplier for supply the material as per long text specifications .
    Regards
    Sameer

  • I was trying to make a new screen recording using quicktimeplay, but when I watched the video after recording it all I could hear was me talking while the video was showing on the screen. How do I turn off that recording and turn the right one on? thanks

    I was trying to make a new screen recording using quicktimeplay, but when I watched the video after recording it all I could hear was me talking while the video was showing on the screen. How do I turn off that recording and turn the right one on? thanks

    Hi j2399123,
    It sounds like your screen recording is doing what it was designed to do, capture what is happening on your screen, with optional voice over with the microphone.
    Screen recording is for recording what you see on the screen, it is not a "video capture" option, like for capturing a movie with sound that is playing on your screen.
    For the QuickTime recording options, check out "Recording with QuickTime Player" in
    Mac Basics: QuickTime Player creates, plays, edits, and shares video and audio files
    http://support.apple.com/kb/ht4024
    And for screen recording specifically, there's
    QuickTime Player 10.x: Record your computer’s screen
    http://support.apple.com/kb/PH5882
    Thank you for thinking of Apple Support Communities for your support needs.
    Nubz

  • Hello Apple community... I am trying to combine multiple pdf's into one, using preview, but when I drag the additional pages they show up as separate documents.

    I am trying to combine multiple pdf's into one, using preview, but when I drag the additional pages they show up as separate documents.  When I drag the doc in a line would show up in the past, and if I went above th eline all was good.  It doesn't have a line, and no matter what I try I am having no success.
    Please help!

    According to an Apple Support article, unless there are unforeseen issues
    in file ownership or permissions, the combining of .PDFs should be simple.
    •OS X: Combining PDF documents using Preview - Apple Support
    There are a few variable and similar methods, some change with version
    of OS X in use; some vintage OS X may vary a little in the process...
    A variety of similar topics appear in search results, with terms:
    " mac os x combine pdf into one " such as this page shows...
    https://www.google.com/?gws_rd=ssl#q=mac%20os%20x%20combine%20pdf%20into%20one
    If the system is older than Mavericks there may be other methods to try.
    Suggestions are among linked results in the search. I see a few fair ones.
    •Here's another that offers generally similar suggestions...*  this info looks OK, extra links, do not:
    http://osxdaily.com/2014/06/27/how-to-join-multiple-pdf-files-into-a-single-pdf- document-in-mac-os-x/
    { note: avoid clicking on links to products in * this ^ page, since they likely will not help & may be adware prone }
    If you have a problem after trying other methods, based on an OS X
    your computer is running, post back with more exact information...
    Good luck & happy computing!
    edited

  • I restored my ipad but i was unable to activate it because it is askimg me for the apple id and password eith which i originally set it up. I know the apple id although i do not remember ever using it but i cannot remember the password.

    I restored my ipad but i was unable to activate it because it is askimg me for the apple id and password eith which i originally set it up. I know the apple id although i do not remember ever using it but i cannot remember the password. I have tried everything from reserting my password to trying different passwords but it asks me for a custom question that i dont remember creating.

    You need to use Apple's iForgot service or contact their Account Security team.
    (123152)

  • Hello all,  I bought an iPhone 5 in the US and brought it back to Brasil. Now I'm trying to use Siri, but once I press the "home" button "voice control" appears and it only works for me to call my contacts. The manual guide tells me to go to Settings Gene

    Hello all,
    I bought an iPhone 5 in the US and brought it back to Brasil. Now I'm trying to use Siri, but once I press the "home" button "voice control" appears and it only works for me to call my contacts. The manual guide tells me to go to Settings>General>Siri. At the General menu "Siri" doesn't appear. What should I do to set Siri up if it doesn't appear at settings>general?
    Thank you,
    Melanie.

    Go to Settings>General>Restrictions and make sure Siri is set to On.

  • I have a Iphone4. Trying to update from 4.3.3 to IOS 5 or 6.  There is no 'Update Software' button under Utilities/General. Tried updating using Itunes but it comes up 'The Iphone software update server cannot be contacted' ????

    I have a Iphone4. Trying to update from 4.3.3 to IOS 5 or 6.  There is no 'Update Software' button under Utilities/General. Tried updating using Itunes but it comes up 'The Iphone software update server cannot be contacted' ????

    iOS 4.3.3 doesnt have the "Update your Software" tab so you will need to go to itunes and back up your iphone then restore your iphone and it will download the latest iphone software (6.1.4) if you dont want 6.1.4 download your current version and hit shift on your keyboard (alt if your on Mac I think) and click restore iphone and find your downloaded software 4.3.3 then download iOS 5 or 6 and do the samething after your phone boots up from restoring it to 4.3.3.

  • Having mail 4.5 issues- open mail and get a new features message so I must import messages first in order to use mail 4.5.  Just recently put in MAC OSX 10.6.7.  Once it imports click done to start using mail, but end up with the rainbow wheel? Now What?

    Having mail 4.5 issues- open mail and get a new features message that says in order to use the new features, I must import existing messages into the new version first in order to use mail 4.5.  Just recently put in MAC OSX 10.6.7.  Once it imports I am to click done to start using mail, but end up with the rainbow wheel of death and it also says you cannot use mail until the import is finished? Now What?

    Is Mail still "spinning"?  If it's been doing that for a while, I'd kill it, using either Activity Monitor or the OS X application picker.  Then relaunch Mail and see what happens.
    Two "by the ways":
    1) Your system details mention an PPC iMac.  Since a non-Intel Mac can't run OS X 10.6, you seem to have another Mac.  You might want to consider updating your system details.
    2) You seem to have been misled by the poor labeling of the message composition fields on this forum into trying to enter your entire post into the "subject" field.  In the future, just enter a summary of your post there and the main text into the field below it.

  • I have a MacBook Pro and I created a movie using imovie but once I put the DVD back into my computer it said it was blank! Why?

    I have a MacBook Pro and I created a movie using imovie but once I put the DVD back into my computer it said it was blank! Why?
    Please HELP!!!!

    AFAIK, you can't author a DVD using iMovie - again, AFAIK, you need authoring software such as iDVD or Toast Titanium or something similar.
    Clinton

  • Error Message: The content processing pipeline failed to process the item

    Hi Everyone:
    Our crawl logs yesterday show a ton of errors.  Half of the items being crawled are failing.  We are getting the following message:
    The content processing pipeline failed to process the item. ( There was an internal problem connecting to or querying the database.; ; SearchID = 8869868B-F919-41D1-8FC5-B55585EE479C )
    Does anyone know what the root cause of this issue is?  Our search was working just fine and now this has suddenly occurred.  Can it be due to resources?  Is it because of a change we just made?
    Thank you,
    Jake

    Hi Jake,
    What changes have you made for your SharePoint environment?
    Have you reset search index and started a full crawl if possible?
    Please check the following article about adding the search service account in SharePoint search server local admin, then check results again.
    http://trikks.wordpress.com/2013/03/19/fixing-the-sharepoint-2013-search-error-the-content-processing-pipeline-failed-to-process-the-item/
    Thanks
    Daniel Yang
    TechNet Community Support

  • Hello! How I can cancel my iCloud account? I would like to use alias but I have create the second account by mistake. Now, user's name for one alias is unavailable!  Thank you! LG

    Hello! How I can cancel my iCloud account? I would like to use alias but I have create the second account by mistake.
    Now, user's name for one alias is unavailable!
    Thank you! LG

    To the best of my knowledge you have now unfortunately blocked yourself: you can't cancel an iCloud account and as you've got the address there you can't add it as an alias, and I don't know of any workaround for that.

  • I cannot connect to the internet using apps but im connected to the internet!

    i cannot connect to the internet using apps but im connected to the internet!

    What makes you think that you are connected to the internet then?
    Try:
    - Resetting the iPod. Nothing will be lost.
    Reset iPod touch:  Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Power off and then back on your router
    - Reset ntwork settings: Settings>General>Reset>Reset Ntwork Settings.
    - iPhone and iPod touch: Troubleshooting Wi-Fi networks and connections

  • SQL Server 2014 installation using command line fails to remove the extraction folder when complete

    We need to install SQL Server 2014 Express in /QS mode (shows
    progress through the UI, but does not accept any input or show any error messages) as
    my setup-Prerequisite. I passed my installation parameters to
    SQLEXPRWT_x64_ENU.exe, when I ran my application it pop-ups
    user to select the folder to extract files. After I choose the folder, SQL
    files got extracted and the installation proceeded and it got succeed.
    But it fails to remove the extraction folder when installation is complete.

    There is an issue that /qs parameter is not recognized and cannot be used the same
    way as in SQL 2012. That issue will be addressed in SQL Server 2014 Service Pack 1.
    https://connect.microsoft.com/SQLServer/feedback/details/878374/sql-server-2014-express-qs-parameter-requires-user-input

  • I CAN SELECT A ITEM WITH TRACK PAD, But can not open the item

    Mac Book 15 inch
    OS X 10.10
    New to Mac
    Using track pad I can select an item by one click but can not open this item with 2 clicks.

    Go to System Preferences>Track pad and check the Secondary Click settings

  • HT1766 I tried to upload the data on my iPhone to a new Windows 8 laptop using iTunes but it only copied the music and wiped my contacts and calendar.

    Any help gratefully received.  Would it have saved the data on the hard drive on my PC?  I can see a file called data.syncdb on the C drive but have no idea what's in it or how to use it.

    Hi NWL1,
    Thanks for the question. If I understand correctly, the iPhone won't update and is stuck. I would recommend that you read this article, it may be able to help you resolve or isolate the issue.
    If you can't update or restore your iPhone, iPad, or iPod touch - Apple Support
    Thanks for using Apple Support Communities.
    Have a great day,
    Mario

Maybe you are looking for

  • Bootcamp -- Windows 7 64-bit 0x80070570 Error During Installation

    Hello Apple community, I am trying to install Windows 7 Ultimate 64-bit on my Late 2011 early 2012 MacBook Pro 15 inch. I go through the Bootcamp process, insert the installation disc everything works fine up to the part when Windows is Expanding Fil

  • Sync of send messages from iCloud to Mail blocks

    Hi all, Since Apple had some problems with their iCloud service on June 18th, I experience very annoying problems with Mail. When trying to sync mail with my iCloud account the "Send mail" box does sync everything properly, but the strange thing that

  • Use of Impact Test with SW Trigger(DAQmx) vi

    Hello, I working on modal analysis (with hammer) and so I am trying to use Impact Test with SW Trigger(DAQmx) vi but I don't get signal of the acceleration (should be acquire as voltage), whereas I get the impact. And when I impact the beam I have an

  • I deleted photo booth by accident

    So, I accidentally deleted the photo booth application. It is gone. I have searched applications, the HD, etc. My Macbook is very new (Christmas) just for reference. I tried reinstalling my the bundled applications on my Mac OS X disk but is wasn't t

  • Set default program

    I am new to macs so I don't really know my way around very well. I installed office on my computer but much prefer pages. I know pages can read .doc files but can't figure out how I can set my mac to always open them in pages instead of word. Help pl