Workflow for BO BUS1001006 not retreiving plant

Hi Experts,
I have activated a workflow for material creation using BO BUS1001006 .
It works fine , but the problem is it does not give me the plant details.
My requirement is that i have to send the plant of the material created /changed.
from which field of bus1001006 can i get it  ?
hope you offer quick solutions.

Hi Martina,
If you have done that then you are almost on the verge of completion!
Follow this binding procedure between the task container and the method container and get the results.
In the BO method, add an output parameter that would store the plant detail.
Now create a data element in the method code of the same type as plant detail type.
Then use swc_set_element to store the value of the plant detail in the output parameter.
In the workflow task, create an output parameter of the same type as the BO method output parameter.
In the binding between the task container and the method container fetch the value of plant details from method container to task container element.
Now pass this parameter to the workflow container and use in the send mail step in the mail text.
Make sure to save and generate the BO after doing all the changes.
Regards,
Saumya

Similar Messages

  • Workflow for BO BUS1001006 not retreiving plantu2666

    Hi Experts,
    I have activated a workflow for material creation using BO BUS1001006 .
    It works fine , but the problem is it does not give me the plant details.
    My requirement is that i have to send the plant of the material created /changed.
    hope you offer quick solutions.
    <THREAD LOCKED. Duplicate of [Workflow for BO BUS1001006 not retreiving plant]. Please do not duplicate posts, read the [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] for further info>
    Edited by: Mike Pokraka on Jan 28, 2009 7:33 AM

    Hi Martina,
    If you have done that then you are almost on the verge of completion!
    Follow this binding procedure between the task container and the method container and get the results.
    In the BO method, add an output parameter that would store the plant detail.
    Now create a data element in the method code of the same type as plant detail type.
    Then use swc_set_element to store the value of the plant detail in the output parameter.
    In the workflow task, create an output parameter of the same type as the BO method output parameter.
    In the binding between the task container and the method container fetch the value of plant details from method container to task container element.
    Now pass this parameter to the workflow container and use in the send mail step in the mail text.
    Make sure to save and generate the BO after doing all the changes.
    Regards,
    Saumya

  • BUS2032 workflow for chaged event not working

    Moderator message: please do not offer to reward with points
    hi experts,
    I have developed a workflow with the object BUS2032 to get triggred if the sales order is changed
    The workflow has been activated and the linkage has been tested in SWETYPV .
    I hav also checked the start events .
    They are active and in green status.
    But still my workflow is not getting triggered on save/change of VA32
    I am not able to seee naytrace of it in SWEL log
    Kindly suggest me how to proceed.
    <<Text removed>>
    Regards,
    Martina
    Edited by: Matt on Nov 20, 2008 1:19 PM

    Hi Martina,
    check this link.
    ****************/Tutorials/Workflow/PO/Change.htm
    in this link , there is step by spep scenrio
    hope it may help you.
    thanks
    sachin

  • Workflow for approval Plant/Company code wise

    Dear Gurus,
    I am new to work-flow I want to change my work-flow according to company/plant wise .
    Right now we have made a workflow with two release levels one for purchase and second for Finance.
    We have got two companies under one client and same controlling area. But both companies have different company codes.
    When Po is sent for approval the alert mail is given in SAP-inbox of approving authorities according to category like Spare,Raw material etc.
    But due to same workflow the mail goes to both companies authorized persons so what happens person from one company is giving approvals for another company. So we want to sent mails to SAP inbox according to their company codes or if this is not possible than plant wise.
    Thanks in advance
    Himanshu

    Hi,
    As per requirement i think your workflow is working fine in particular plant, if yes means in your workflow container is there any company code is available please confirm the company code in workflow container
    if company code is available means then you all just want to do is you need to bind the company code to your business rules and your open sql query should be based on company code also, then your agent assignment will automatically work for different plant. 
    Hope this helps,
    Srinivasan.R

  • Workflow Start "Failed But Not Blocking Correlation" - Project Server workflow for Demand Management

    Hi,
    I'm trying to "Create a Project Server workflow for Demand Management" with project server 2013 just like is explained
    here.
    But when I try to create a new project the implemented workflow failed to start with the follow state message in the job queue: Failed But Not Blocking Correlation.
    The detailed error display the follow message:
    Exception Starting Workflow: The scope _/SharePoint/default/139e833f-7a85-4ccf-b7a2-b3fea9ce50b9/6799b7e5-e519-40f4-9371-0b3bc3d5c208_ has no workflows under it. HTTP headers received from the server - ActivityId: 52fef415-409b-4545-a9f6-ed75519b425c.
    NodeId: My-Computer-Name. Scope: /SharePoint/default/139e833f-7a85-4ccf-b7a2-b3fea9ce50b9/6799b7e5-e519-40f4-9371-0b3bc3d5c208. Client ActivityId : 9ded4d9c-7733-7004-2661-c8977270af98.. Trace:    at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T](HttpWebRequest
    request, T content)   at Microsoft.Workflow.Client.WorkflowManager.StartInternal(String workflowName, WorkflowStartParameters startParameters)   at Microsoft.SharePoint.WorkflowServices.FabricWorkflowManagementClient.StartInstance(String
    serviceGroupName, String workflowName, String monitoringParam, String activationKey, IDictionary`2 payload)   at Microsoft.SharePoint.WorkflowServices.FabricWorkflowInstanceProvider.StartWorkflow(WorkflowSubscription subscription, IDictionary`2 payload)  
    at Microsoft.Office.Project.Server.BusinessLayer.Workflow.StartWorkflow(Guid projectGuid, Guid enterpriseProjectTypeUid, Boolean isNewProject, Guid previousEntepriseProjectTypeUid, Boolean skipStage, Guid stageToSkipTo):
    WorkflowExceptionStartingWorkflow (35115). Details: id='35115' name='WorkflowExceptionStartingWorkflow' uid='e3bbb06b-1d38-e311-940a-001cc094718e'.
    Error:
    WorkflowCannotStartWorkflow (35100). Details: id='35100' name='WorkflowCannotStartWorkflow' uid='e4bbb06b-1d38-e311-940a-001cc094718e'.
    Queue:
    GeneralQueueJobFailed (26000) - WorkflowStartWorkflow.WorkflowStartWorkflowMessage. Details: id='26000' name='GeneralQueueJobFailed' uid='e5bbb06b-1d38-e311-940a-001cc094718e' JobUID='68ee1040-1d38-e311-940a-001cc094718e'
    ComputerName='90f7432c-fbc8-4ebd-86f3-0236ce62661c' GroupType='WorkflowStartWorkflow' MessageType='WorkflowStartWorkflowMessage' MessageId='1' Stage='' CorrelationUID='9ded4d9c-7733-7004-2661-c8977270af98'. For more details, check the ULS logs on machine
    90f7432c-fbc8-4ebd-86f3-0236ce62661c for entries with JobUID
    68ee1040-1d38-e311-940a-001cc094718e.
    with this detailed entries in the log file
    10/18/2013 13:47:57.38  Microsoft.Office.Project.Server (0x0948) 0x14F0 Project Server                 Queue                        
     ad3fy Critical Standard Information:PSI Entry Point: <unknown>  Project User: <unknown>  Correlation Id: <unknown>  PWA Site URL:   SA Name: <unknown>  PSError: <unknown> A queue job
    has failed. This is a general error logged by the Project Server Queue everytime a job fails - for effective troubleshooting use this error message with other more specific error messages (if any), the Operations guide (which documents more details about queued
    jobs) and the trace log (which could provide more detailed context). More information about the failed job follows. GUID of the failed job: 68ee1040-1d38-e311-940a-001cc094718e. Name of the computer that processed this job: 90f7432c-fbc8-4ebd-86f3-0236ce62661c
    (to debug further, you need to look at the trace log from this computer). Failed job type: WorkflowStartWorkf... 9ded4d9c-7733-7004-2661-c8977270af98
    10/18/2013 13:47:57.38* Microsoft.Office.Project.Server (0x0948) 0x14F0 Project Server                 Queue                        
     ad3fy Critical ...low. Failed sub-job type: WorkflowStartWorkflowMessage. Failed sub-job ID: 1. Stage where sub-job failed:  (this is useful when one sub-job has more than one logical processing stages). 9ded4d9c-7733-7004-2661-c8977270af98
    10/18/2013 13:47:57.38  Microsoft.Office.Project.Server (0x0948) 0x14F0 Project Server                 Queue Jobs                   
     ad3fy Medium   Error is: GeneralQueueJobFailed. Details: Queue Attributes:  68ee1040-1d38-e311-940a-001cc094718e  90f7432c-fbc8-4ebd-86f3-0236ce62661c  WorkflowStartWorkflow  WorkflowStartWorkflowMessage  1   
    9ded4d9c-7733-7004-2661-c8977270af98  . Standard Information: , LogLevelManager Warning-ulsID:0x000DD158 has no entities explicitly specified. 9ded4d9c-7733-7004-2661-c8977270af98
    Any idea?
    Thanks in advance,
    Alexander.

    Hi Alexander,I have seen that error when the workflow manager has not been registered correctly with the PowerShell command - that should be in the docs referenced - or
    http://technet.microsoft.com/en-us/library/jj663115.aspx.  Let me know if that doesn't appear to be the issue here and I can dig deeper.  Best regards,  Brian
    Blog |
    Facebook | Twitter | Posting is provided "AS IS" with no warranties, and confers no rights.
    Project Server TechCenter |
    Project Developer Center |
    Project Server Help | Project Product Page

  • Workflow for PO release strategy agent not found

    Hi all,
    I m beginner in the workflow. i  want to create a workflow for the PO. release strategy I have done all the settings in the SPRO for the release strategy. I have copied the standard workflow definition  WS20000075 also done the binding with object type BUS2012. in the steps 'Release of purchase order' i have mentioned the task TS20000166 i.e. 'Release of purchase order' and also maintain the AC Rule 20000027 i.e. 'Person responsible for PO release' for agents. But still its not getting the agents. the workflow is getting triggered but its not getting the agent. What else setting I need to do to get this done.
    Thanks a lot.
    Regards.

    Very well put Rick. In my case if i simulate this workflow from swdd transaction then it works fine but the same workflow when initiated from ME21N doesn't work and throws same error.
    1. I have copied standard workflow and task 166 is throwing error.
    "Resolution of rule AC20000027 for task TS20000166: no agent found"
    2. I have recreated the step but still the workflow is throwing error.
    3. If I execute the rule individually (PFAC_DIS) with a specific PO then the rule works fine. The rule executes the below mentioned exit successfully.
    4. I am using exit to determine the agent, the workflow works fine if I don't use the exit. The exit is EXIT_SAPLEBNF_005. I am just pulling the agent from a ztable.
    Please advise if you can help as I have not seen anyone answering.
    by the way irrespective of the explicit rule update in the workflow the step executes AC20000027 by default.
    Any help on above is appreciated.

  • Workflow configuration for warehouse does not work

    Hi,
    I´m trying to create a workflow for a datawarehouse but for that I need to configure it.
    When going to the Workflow Configuration Assistant it does not run. any idea?

    hi,
    i have installed de datawarehouse builder and then the server workflow 6.3. i had problems at installing the workflow and after looking in different forums the solution was that before installing I should do:
    IGNORE_PREREQ=TRUE
    After installing a new entry appeared in inicio->programs-><oracle_home>->migrating tools it was the workflow configuration assistant.
    When executing this link a black screen appears and after 30secs it dissapears and nothing else happens.
    In the tutorial
    http://www.oracle.com/technology/obe/10gr2_owb/owb10gr2_gs/owb/lesson4/etl-mappings.htm
    explains how the configuration should be but I can not do it.

  • Material master workflow for changes

    Hi Experts
    I have a requirement to trigger multiple material workflows for all the plants that have a blocked status in MRP1 when the material gets uploaded into SAP from a third party.
    I have used SWEC and created a new 'MaterialChanged' event and put a start condition for the workflow to look at the MRP1/status.
    This looks to work fine as long as there is one plant and its MRP1 has blocked status. I am not able to figure out how to handle if there is a multiple plant specific data for a material and all or some of the plants are blocked, this is when multiple workflows are expected to trigger for each plant. Each plant has got different set of approvers.
    Because I think the 'trigger' will happen only once for a material irrespective of how many plants the material may have.
    If any of you have handled this kind of scenario, appreciate your help.
    Thanks 
    Sasi

    Hi,
    I think the easiest would be to just echance the business object with an attribute if there are any plants with the blocked status.
    then in your workflow, you retrieve how many plants there are with blocked status and then use that data in the other tab for multiline element in a subworkflow.
    This will create all the workflows per plant.
    Kind regards, Rob Dielemans

  • Release Strategy with Workflow for PR & PO

    Hi Experts,
    I have configured the PR & PO Release strategy and it is working fine. My client wants the Workflow concept in Releases.
    So User should get the information about the releases for PR & PO.
    But I don't have much idea on Workflow, how it works for Release strategy. Can anybody give information on how to configure the Release strategy with Workflow in PR & PO.
    Points will be awarded .
    thanks & rgds
    Swamy

    Hi Swamy,
    The release workflow is configured by MM functional consultant. As for the workflow determination (i.e. which level should approve first and so forth) depends solely/mainly on the Finance of the company. It differs from one company to another. And the level of approval also differ from one company to another. Hence, like you mentioned, this would be provided by the user, so it is okay. I have replied to someone on another thread asking about workflow, and this is how it works.
    How it works? For example, for a PR release strategy, once the PR is raised by a user for a certain value, the PR raised that matched the classification of the release strategy configured will be triggered. In this sense, once the release strategy is triggered, the releaser holding the release code to release this PR will receive a workflow in their SAP inbox (Not Outlook) for their execution, which is sent automatically by SAP system. These is accessible via the t-code SBWP. Each releaser have a unique login ID and password.
    Assuming the release strategy required 3 levels of release, for example A3, A2 and finally A1 (final release), A3 will first receive this workflow in his/her inbox. After A3 has released, A2 will subsequently receive workflow in his/her inbox for this same PR. In the PR, you will be able to see that A2 release is now possible. This flow will continue until the final releaser, A1 and then, the status of the PR will be unblocked for issuance of PO.
    How is it configured in SPRO? In the Workflow for PR release strategy, you are able to assign a unique ID (usually employee ID) to a particular release code, which these release codes are tied to one or more release strategies. The workflow determines who is to release for a release strategy with that particular release code via the assignment of the ID to that particular release code. Each assignment is only possible for one Plant, and you have to assign the same for many other Plants for the same ID in the workflow if you want him/her to have the authority to release purchasing docs in more than one Plant.
    How to configure?
    Before that, you need to obtain the following information - User ID of the releaser for the specified release code, Plant to be released by the user, and finally of course the Group and Release code (which you already have).
    For PR: IMG>MM>Purchasing>Purchase Requisition>Release Procedure>Procedure with Classification>Set Up Procedure with Classification-->Workflow
    For PO: IMG>MM>Purchasing>Purchase Order>Release Procedure for Purchase Orders>Define Release Procedure for Purchase Orders>Workflow.
    Maintain the details u already have in hand:
    For PR: Group (PR or PO), Code (release code), Plant (you have to maintain the same details for each of the Plant that the same release code releases) Object (US) and Agent ID (the user's ID used to login to SAP system and SBWP).
    For PO: Group (PR or PO), Code (release code), Object (US) and Agent ID (the user's ID used to login to SAP system and SBWP).
    Please note that PO is not Plant specific, and is usually one releaser to release the PO for GR. It is the PR that during the initial stage has the most level of release (up to max. 8 level) before a PR can be converted to PO.  After the PO is converted, it is usually deemed accepted, hence only one release code is usually required to release the PO.
    Hope this will give you an idea how the workflow works and how to configure it.
    Rgds.

  • Business object  for material , template workflow for materials ?

    Hi,
    I need to create a workflow for material master , creating material basic data, create plant views etc
    Which is the appropriate workflow and is there a standard one as a template?
    Thanks
    Antonis

    Hello,
    I feel it is better that you use the standard business object BUS1001006 for your requirement related to the material management as some of the events which are obsolete in the business object BUS1001 have been redefined in BUS1001006.
    Events like "Material created" and "New View for the material Created" are redefined which I think you need for your requirement.
    Hope this will help.
    Regards,
    Samson

  • PR Workflow for release strategy

    Hi,
    Could you please let me know the steps how to configure the workflow for the PR release strategy for both item level as well as header level.
    Thanks in advance
    Shp

    Hello,
    If you wish to work with procedure 1, define the following:
    Release codes
    Release indicators
    Assignment of release indicators
    Release prerequisites
    Determination of release strategy
    1. Release codes
    Create the release codes.
    2. Release indicators
    Define release indicators and branch to the detail screen. Here you define whether fixed purchase requisitions may be changed by Materials Planning, for example, and whether an RFQ or a purchase order may be created from the requisition.
    You can also determine the field selection here.
    In the area "Changes after the start of the release procedure", you specify whether a requisition may be changed after the release procedure has begun. You specify whether the strategy has to be redetermined after changes, or whether the release procedure has to start all over again from the beginning.
    This parameter bears a relation to the parameter "Value change". For example, previous releases are not cancelled if the value of the requisition item after the change does not exceed plus 10% of its original value.
    Attention:
    Be sure to create a release indicator (e.g. B for "blocked") that serves as the starting point for subsequent indicators. Do not set the indicators for release for the issue of RFQs and PO on the detail screen for this indicator.
    Also create a release indicator characterizing the released status. Set the indicators for release for the issue of RFQs and PO on the detail screen.
    3. Assignment of release indicators
    Assign a release indicator in dependence on the status of the release.
    Example:
    You create a release strategy S1 consisting of two release codes 01 and 02. Release with 01 is a prerequisite for release with 02. If release has been effected with 01, the requisition has been given the "all clear" for the issue of RFQs.
    You have created the release indicators B (blocked), 1 (cleared for issue of RFQs) and 2 (cleared for RFQs and PO).
    Now enter the following as assignment:
    Strategy   C1  C2  C3 ...
    S1                           B (blocked)
    S1         X                1 (RFQ)
    S1         X   X            2 (RFQ/PO)
    4. Release prerequisites
    Define which release codes are involved in a release strategy. Specify whether a code is set for a release status following release, and whether one release status is a prerequisite for another (+).
    Example:
    Strategy   Code  C1  C2  C3 ...
    S1         01    X
    S1         02    +   X
    5. Determination of the release strategy
    Determine the conditions under which each release strategy is assigned. The criteria are account assignment category, material group, plant, and value of the requisition item.

  • Approval workflow for external requirement

    Hi,
    My company already implements Project System and Plant Maintenance, in which we generate PR from those modules, and the PR will be subject to release strategy.
    At the moment we want to implement SRM 7.0 and we're planning to use Plan Driven Procurement scenario for the requirement generated automatically from PS or PM. As we can have a release strategy for PR generated from module PM and PS, can we have approval workflow for external requirement in SRM?
    Josh

    Yes you can but not by standard (Since itu2019s not out of box functionality), on the other hand itu2019s real simple to do an RFC call to your external system and get the agentu2019s information...
    All SRM need is only agent ID (User ID) to which the work item need to be assigned...
    We too have same scenario i.e. business want to use R/3 release group determination which they have already... we implemented it and working real good...
    Let me know if you have any questions...
    Thanks!!
    Bharath

  • SRM Workflow for external Purchase requisitions ECC

    Dear experts,
    We are in SRM 7 Classic scenario , ECC 6. Using SRM process controlled workflow . We want to enable SRM workflow for external Purchase requisitions. As per SAP note 505030 topic 16 , approval is not triggered in SRM for external requirements. So we need to find a new solution as it's a clinet requirement.
    Current  scenario:
    External purchase requisition created from ME51N or Plant maintenance are sent to SOCO for buyer completion. External PRs generate a SC BUS2121 EXTR in status approved.
    Desired scenario:
    We want those external requirements to be sent to SRM for approval (approval with completion + approval)
    After implementing changes suggested in Prasannau2019s document (http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/5082a622-7310-2c10-1a9b-ef31dd69a770 ) , the Workflow is still not triggered for the external PRs, the SC is created but remains in status awaiting approval. No work item is created (neither in BBP_PD not in SWI6, not in SWIA).
    Can anyone provide some guidance on what else need to be changed in order to activate SRM Workflow for external PRs?
    Many thanks in advance,
    Nuria
    Edited by: NuriaUB on Dec 28, 2011 5:14 PM

    Hi Any one got answere this issue. I also implemented the steps provided in the document created by Prasannau2019s. The workflow is getting triggered for external requisitions now but when we are changing the PR in ECC and transferring again that time its not gettign triggered neighther its restarting the exisiting approval workflow in process (if any).
    Thanks,
    Swapnil

  • Workflow for Sales Order Release via Status Profile

    Dear all,
    i want to make a workflow for sales order which have 4 User Status in One status profile.
    Once Event triggered for sales order
    1.   Mail should go to main authority with sales order number.
    2.  Once authority will do some changes in the required field then he/she changes
         the user status-1 from defauts as per line Item and mail should go to department no-1 (Head authority).
    3.  Once again same changes in sales order but now user status-2 from user status-1
         as per line Item and mail should go to department no-2 (Head authority).
    4.  Once again same changes in sales order but now user status-3 from user status-2
         as per line Item and mail should go to department no-3 (Head authority).
    5.  Once again same changes in sales order but now user status-4 from user status-3
         as per line Item and mail should go to department no-4 (Head authority) .
    and parrally for each changes of Status mail should also go to User (Event Creator).
    6. Finally mail sholud go to User as you are permitted to do next business transaction for this sales order
    Please tel me the process as i am very new this topic and i am always going to stuck in Binding.
    please help me out.
    Thank You

    Hi Neeraj,
    First of all start with SWELS and SWEL T-Code to check if any standard event is getting triggered or not. If event is getting triggered, then use the same event to trigger the workflow; otherwise create a custom event of BO and use the same to trigger the workflow.
    Hope you are aware of T-Code SWO1 and delegation of BO. The BO used for your requirement will be BUS2000115.
    As you want the workflow to get triggered only for one status profile and one of its status, so use check function module. There set the condition for you status profile and status.
    The FM which you will be using the most is CRM_ORDER_READ. To read the status, you can also use CRM_STATUS_READ_OW.
    Now simply make the approval steps in the workflow using activity. In the activity, you can use the standard method USERSTATUSPOPUP to send the workitem for approval. In each step use the same activity with different agents as approvers.
    Just go with these things and let me know if you get stuck up somewhere.
    Regards,
    Guddan

  • Regarding : Material document data and PO data do not match (Plant)

    Hi Gurus,
    Please go through this BAPI program.
    While uploading it is giving an error ' Material document data and PO data do not match (Plant) '.
    Please help regarding this issue.For all Other moment types it is working fine except this 351 moment type.
    dATA: i_excel TYPE truxs_t_text_data. "work table for excel upload
    DATA: BEGIN OF it_itab OCCURS 100,
          docdate(10),
          postdate(10),
          mvt_type(3), "Movement Type
          plant(4), "Plant
          lgort(4),
          pur_doc(10), "Purchase Document No
          po_item(3), "Purchase Document Item No
          material(18), "Material Number
         delnote(16),
          erfmg(13),
          uom(3),
         lfmng(13), "Quantity
          batch(10) TYPE c,
          vfdat TYPE vfdat,
          END OF it_itab.
    DATA: it_goodsmvt_head TYPE TABLE OF bapi2017_gm_head_01      INITIAL SIZE 100,
          it_goodsmvt_code TYPE TABLE OF bapi2017_gm_code         INITIAL SIZE 100,
          it_goodsmvt_item TYPE TABLE OF bapi2017_gm_item_create  INITIAL SIZE 100.
    DATA: wa_goodsmvt_head LIKE LINE OF it_goodsmvt_head,
          wa_goodsmvt_code LIKE LINE OF it_goodsmvt_code,
          wa_goodsmvt_item LIKE LINE OF it_goodsmvt_item.
    DATA: w_mat_doc  TYPE bapi2017_gm_head_ret-mat_doc,
          w_year     TYPE bapi2017_gm_head_ret-doc_year.
    DATA: BEGIN OF it_errmsg_goodsmvt OCCURS 10.
            INCLUDE STRUCTURE bapiret2.
    DATA: END OF it_errmsg_goodsmvt.
    DATA : obj_type LIKE bapiache09-obj_type,
           obj_key  LIKE bapiache09-obj_key,
           obj_sys  LIKE bapiache09-obj_sys.
    DATA: v_date1 TYPE sy-datum.
    DATA: v_date2 TYPE sy-datum.
    DATA: w_lines TYPE i.
    DATA: errflag.
    SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME TITLE text-100.
    PARAMETERS: p_file TYPE  rlgrap-filename.
    SELECTION-SCREEN END OF BLOCK bk1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          field_name = 'P_FILE'
        IMPORTING
          file_name  = p_file.
    Start-of-selection processing
    START-OF-SELECTION.
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
          i_line_header        = 'X'
          i_tab_raw_data       = i_excel
          i_filename           = p_file
        TABLES
          i_tab_converted_data = it_itab[]
        EXCEPTIONS
          conversion_failed    = 1
          OTHERS               = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      LOOP AT it_itab.
        REFRESH it_goodsmvt_head.
        REFRESH it_goodsmvt_item.
        CONCATENATE it_itab-docdate6(4) it_itab-docdate3(2) it_itab-docdate+0(2) INTO v_date1.
        CONCATENATE it_itab-postdate6(4) it_itab-postdate3(2) it_itab-postdate+0(2) INTO v_date2.
        wa_goodsmvt_head-pstng_date = v_date2.
        wa_goodsmvt_head-doc_date   = v_date1.
       wa_goodsmvt_head-ref_doc_no = it_itab-delnote.
    wa_goodsmvt_head-pr_uname   = sy-uname.
        APPEND wa_goodsmvt_head TO it_goodsmvt_head.
    Maintain it_goodsmvt_code
        wa_goodsmvt_code-gm_code    = '04'.
    Maintain it_goodsmvt_item
    *LOOP AT it_itab.
    IF wa_goodsmvt_item-po_number IS INITIAL.
        wa_goodsmvt_item-po_number    = it_itab-pur_doc.
        wa_goodsmvt_item-move_type    = it_itab-mvt_type.
        wa_goodsmvt_item-MOVE_PLANT      = it_itab-plant.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = it_itab-material
          IMPORTING
            output = it_itab-material.
        wa_goodsmvt_item-material     = it_itab-material.
        wa_goodsmvt_item-stge_loc     = it_itab-lgort.
        wa_goodsmvt_item-po_item      = it_itab-po_item.
        wa_goodsmvt_item-entry_qnt    = it_itab-erfmg.
        wa_goodsmvt_item-ENTRY_UOM_ISO    = it_itab-uom.
       wa_goodsmvt_item-po_pr_qnt    = it_itab-lfmng.
        wa_goodsmvt_item-batch        = it_itab-batch.
        wa_goodsmvt_item-expirydate   = it_itab-vfdat.
       wa_goodsmvt_item-NO_MORE_GR   = 'X'.
        wa_goodsmvt_item-mvt_ind      = 'B'.
        APPEND wa_goodsmvt_item TO it_goodsmvt_item.
        CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
          EXPORTING
            goodsmvt_header  = wa_goodsmvt_head
            goodsmvt_code    = wa_goodsmvt_code
          IMPORTING
            materialdocument = w_mat_doc
          TABLES
            goodsmvt_item    = it_goodsmvt_item
            return           = it_errmsg_goodsmvt.
    Process of commit work
        IF it_goodsmvt_head[] IS NOT INITIAL.
          DESCRIBE TABLE it_goodsmvt_head LINES w_lines.
        ENDIF.
        IF it_goodsmvt_item[] IS NOT INITIAL.
          DESCRIBE TABLE it_goodsmvt_item LINES w_lines.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
              wait = 'X'.
        IMPORTING
        RETURN        =
          CLEAR errflag.
          READ TABLE it_errmsg_goodsmvt INDEX 1.
          IF it_errmsg_goodsmvt-type EQ 'E'.
            WRITE:/'Error in function', it_errmsg_goodsmvt-message.
            errflag = 'X'.
          ELSE.
            WRITE:/ it_errmsg_goodsmvt-message.
          ENDIF.
          IF errflag IS INITIAL.
            COMMIT WORK AND WAIT.
            IF sy-subrc NE 0.
              WRITE:/ 'Error in updating'.
              EXIT.
            ELSE.
              WRITE:/ 'Material Document created successfully and the Document Number for the Material',
                      wa_goodsmvt_item-material,'is:', w_mat_doc, w_year.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.

    Hey,
    Just wanted to post that in my case this was the error of MVT_IND field in item table. When I made it from 'B' to blank then it worked.
    Mine is solved....
    Thanks

Maybe you are looking for

  • How to get Initial context of Local Interface in weblogic 8.1

    I have developed a local entity bean but i wouldnt able to initial context of that bean CAN ANYBODY HELP ME bean deployment descriptor <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBean

  • How to create oracle.sql.array

    I need to create an oracle.sql.array to pass in my custom objects array to the database. I know you can create it using the ArrayDescriptor class but the problem with that is the connection object is need. I am using the writeSql() method of the SQLD

  • Which MP3 Player Should I buy?

    After using a MP3 player in my clunky  5 year old cell phone for years, I'd like to buy a player.  I understand that the I-tunes program that my sister downloaded onto my computer, along with her songs will only play on an Apple I-Pod.  Does that mea

  • HT3702 Payment info does not Match bank statement

    Called the bank, typed all the info exCtly as the bank told me...still apple wont let me use it.

  • Re: Complaint over poor customer service - Broadba...

    Just go! I've got them to drop my contract without penalty charges.   I ordered BT Infinity2 in September 2012, having been sucked into the 76Mb download speeds dream.   I waited weeks for a line to be installed, but was given ordinary broadband with