Reg: i want to get nagative values for movement type 102

Hi All
I have developed  a report
in that report
output fields are
po no     mater docment no  movement type   qty     netprice
500023     4990                         101              10       100
500024     4556                         102               12       200
this is the output i am getting.
for movement type 102 i want to get the nagtive  values .
example
po no     mater docment no  movement type   qty     netprice
500023     4990                         101              10       100
500024     4556                         102              -12     - 200
pls can u help
who to write logic
thanks
mars

hi,
use this.
loop at itab.
if itab-bwart = '102'.
itab-menge = - ( itab-menge ).
itab-netpr = - ( itab-netpr )
endif.
endloop.

Similar Messages

  • What is d BAPI for reversal of Good Receipt Note(GRN) for movement type 102

    Hi ABAPers,
       I have got requirement like this , I have done Goods Receipt Note (GRN) based on Purchse order Number using '.BAPI_GOODSMVT_CREATE' with 101 movement type.
       But now my requirement is reversal of good receipt note(GRN) based on Material Document Number (or) Purchase Order Number with 102 movement type. what is the bapi name i need to use. and i need to give reason for the reversal of GRN.
    please tell me the field name for reason  in bapi.
    i have searched in the net, but i could not get proper answer to this isse.
    Highly appriciate who gives answer as early as possible. I need to complete this task EOD. please give replies.
    Thanks & Regards,
    Vinay Kumar.

    Hi,
    If your material document has specific movement type i.e. 101, if you cancel document using BAPI_GOODSMVT_CANCEL, it automatically picks associated movement type 102 defined in customizing setting, you don't need to pass 102 explicitly while cancelling.
    I have not seen reason code in this bapi, but it is required to pass reason code then you may try transaction code MBST using BDC.
    Thanks,
    Ashok Veer

  • Different Consumption Account for Movement type 201 and 261

    Dear All ;
    Client want use different consumption account for movement type 201 and 261  .
    How we canmap this in SAP
    Kindly suggest .
    Regards;
    Joydeep Mukherjee

    This you can acheive by setting account assignment indicator is checked.
    OMJJ >>> Movement Type >>>Account Grouping >>Check account Assignment
    If this indicator is set, the system checks whether a G/L account or an account assignment has been specified on the item screen when user post transactional data. If so, the system copies this data to the posting line for account determination.
    If this indicator is not set, the system always uses the G/L accounts or account assignments determined automatically.

  • New Field addtion for movement types

    Hi Everyone,
    I want to add new field for movement type 301(vendor material no)can you please guide me how to accomplish this task.
    Thanks
    Venkat

    Dear,
    Do the 311 movement through the MIGO and then set field for MIGO
    Vendor Material No.     GOITEM-IDNLF
    Vendor Material No.     GOSEARCH_PO-IDNLF as highlited filed in OMJX
    Or else with MB1b you can use the text fiied for Vendor Material no.
    Hope it will solve ypur problem.
    Regards,
    R.Brahmankar

  • Restriction for Movement type 202

    Dear SAP Consultants,
    I want to make the restriction for Movement type 202 by material document.
    The user should only be able to do the 202 Movement type in MB1B with reference of 201 Movement only .
    Kindly give me the details for incorporating it .
    Best Regards
    Deepak Rade

    HI,
    202 movement type is the reversal movement type of 201 (goods issue to cost center)
    when we cancel material document with 201 system create reversal posting with 202
    And you can manually enter 202 movement type also in MB1A and MIGO
    Now if you want to restrict user to use 202 directly
    GO to OMJJ -> select movement type 202 ->allowed transaction ->Remove MB1A and MIGO and save
    So you can only cancel a material document of 201 to create 202 not possible to create manually (without reference)
    {IF in future needed you can always add those in OMJJ again}
    You can cancel material document is through T. Code MBST
    This will fully serve your purpose

  • Restriction for Movement type 202 - reference of 201 Movement only

    Dear SAP Consultants,
    I want  to make the restriction for Movement type 202 by material document.
    The  user should only be able to do the 202 Movement type in MB1B with reference of 201 Movement only .
    Kindly give me the details for incorporating it .
    Best Regards
    Deepak Rade

    Hello Deepak,
    This is SAP SNC SDN forum and your query looks like more of the of SAP MM.
    You can post your query in SAP MM SDN forum.
    SAP ERP - Logistics Materials Management (SAP MM)
    Regards,
    Nikhil

  • Want to get sequence value from bean

    I want to get sequecne value in abean
    when i try to make this
            String EmpId = (String)JSFUtils.resolveExpression("#{bindings.EmpViewId.inputValue}");Error appear
    Caused by: java.lang.ClassCastException: oracle.jbo.domain.DBSequence cannot be cast to java.lang.String
    and when i tried
            DBSequence EmpId = (DBSequence)JSFUtils.resolveExpression("#{bindings.EmpViewId.inputValue}");another errpr appeared
    how can i catch this DBSequence value

    you did not mention your JDev version.
    For 10g it might be helpful:
    http://database.in2p3.fr/doc/oracle/Oracle_Application_Server_10_Release_3/web.1013/b25947/web_complex006.htm
    Example 19-49 Value Change Listener Method for Handling a File Upload Event
    String fileUploadLoc =
    FacesContext.getCurrentInstance().getExternalContext().
    getInitParameter("SRDemo.FILE_UPLOADS_DIR");
    if (fileUploadLoc == null) {
    // Backup value if context init parameter not set.
    fileUploadLoc = "/tmp/srdemo_fileuploads";
    //get svrId and append to file upload location
    DBSequence svrId =
    (DBSequence)ADFUtils.getBoundAttributeValue("SvrId");
    fileUploadLoc += "/sr_" + svrId + "_uploadedfiles";
    I don't know if it works for 11g too.
    NA
    http://nickaiva.blogspot.com/

  • I want to get desktop path for client user using webutil

    oracle database 11g
    oracle forms 10 g
    client windows
    i want to get desktop path for client user using webutil
    as i want to save file in this path

    To get the user's path to their Desktop is a two step process.  First, you have to echo the %USERPROFILE% to a output file and secondly, read the directory from the output file in to Forms.  The code would look similar to the following:
    /* When-Button-Pressed trigger */
    DECLARE
      v_temp_path VARCHAR2(250);
      v_temp_file VARCHAR2(12) := 'webutil.log';
      f_file Client_Text_IO.File_Type;
    BEGIN
      Client_Host('cmd /c echo %USERPROFILE%\Desktop > c:\'||v_temp_file);
      f_file := Client_Text_Io.FOpen('c:\'||v_temp_file, 'R');
    Client_Text_Io.Get_Line(f_file,v_temp_path);
    Client_Text_Io.FClose(f_file);
       b_dummy := WebUtil_File.Delete_File('C:\'||v_temp_file);
      --At this point, you have the path stored in the v_temp_path variable.
      --You can assign this variable to a block item or reference it directly in your code.
    END;
    When you reference the value of the v_temp_path, don't forget to wrap the value in double-quotes (" ") becuase the path will have spaces.  Since your plan is to write a file to the user's desktop, your call to FOPEN will look  like this:
    f_file := Client_Text_Io.FOpen('"'||v_temp_file||'"','W');
    Hope this helps,
    Craig...

  • How To get Characteristic values for an Equipment in a particular Class ?

    Hi All,
    How i will get  Characteristic values for an Equipment in a particular Class ?
    Any table or FM ?
    Thanks in advance
    Srikanta Gope

    Hi,
    You can use the FM BAPI_OBJCL_GETDETAIL to fetch the characteristic values for an equipment from the table parameters ALLOCVALUESNUM; ALLOCVALUESCHAR; ALLOCVALUESCURR.
    Or u can use the tables EQUI, KLAH, KSSK, AUSP, CABN
    Regards,
    Aditya

  • How can I get null values for the later weeks

    Hi All,
    When I execute this code I get the records till current week.
    How can I display the output so that I get null values for the later weeks. (with the help of v_numOfWeeks variable in the code)
    Thanks,
    Vikram
    DECLARE
       v_query VARCHAR2(4000);
       TYPE ref_cursor IS REF CURSOR;
       v_refcur ref_cursor;
       v_sum NUMBER;
       v_id NUMBER;
       v_name VARCHAR2(1000);
       v_weeknum NUMBER;
       v_pernum NUMBER;
       v_numOfWeeks NUMBER := 5;
    BEGIN
    v_query := ' SELECT SUM(product_bkg), postn_id, postn_tbl.postn_name, b.week_num, b.period_num
                              FROM ops_cv_extract b, (SELECT row_id, desc_text postn_name
                          FROM s_postn) postn_tbl
                          WHERE lvl_6_id = 5767
                          AND fiscal_year = 2008
                          AND b.week_num < 4
                          AND b.period_num = 3
                          AND b.postn_id = TO_NUMBER(postn_tbl.row_id)
                          GROUP BY postn_id, postn_tbl.postn_name, b.week_num, b.period_num
                          ORDER BY  postn_tbl.postn_name, b.week_num';
    OPEN v_refcur FOR v_query;
    LOOP
       FETCH v_refcur INTO v_sum, v_id, v_name, v_weeknum, v_pernum;
       EXIT WHEN v_refcur%notfound;
       dbms_output.put_line('P'|| v_pernum||'W'|| v_weeknum||' '||v_name||' '||v_sum);
    END LOOP;
    END;
    This is the output when I execute this code.
    P3W1 COMM CNTRL ISAM 213 26961.61
    P3W2 COMM CNTRL ISAM 213 12870.4
    P3W3 COMM CNTRL ISAM 213 245.88
    P3W1 COMM CNTRL ISAM 273 72831.2
    P3W2 COMM CNTRL ISAM 273 8739.38
    P3W3 COMM CNTRL ISAM 273 3764.92
    P3W1 COMM CNTRL TAM 213 49844
    P3W2 COMM CNTRL TAM 213 20515.17
    P3W3 COMM CNTRL TAM 213 16167.46
    P3W2 COMM CNTRL TAM 216 12561.4
    P3W3 COMM CNTRL TAM 216 2027.1
    P3W1 COMM CNTRL TAM 273 -3336.71
    P3W2 COMM CNTRL TAM 273 -1376.68
    P3W3 COMM CNTRL TAM 273 19707.42
    P3W1 Damon Walters -609.07
    P3W2 Damon Walters 30030.24
    P3W3 Damon Walters 37475.1
    This is the output I'd like to get
    P3W1 COMM CNTRL ISAM 213 26961.61
    P3W2 COMM CNTRL ISAM 213 12870.4
    P3W3 COMM CNTRL ISAM 213 245.88
    P3W4 COMM CNTRL ISAM 213
    P3W5 COMM CNTRL ISAM 213
    P3W1 COMM CNTRL ISAM 273 72831.2
    P3W2 COMM CNTRL ISAM 273 8739.38
    P3W3 COMM CNTRL ISAM 273 3764.92
    P3W4 COMM CNTRL ISAM 273
    P3W5 COMM CNTRL ISAM 273
    P3W1 COMM CNTRL TAM 213 49844
    P3W2 COMM CNTRL TAM 213 20515.17
    P3W3 COMM CNTRL TAM 213 16167.46
    P3W4 COMM CNTRL TAM 213
    P3W5 COMM CNTRL TAM 213
    P3W1 COMM CNTRL TAM 273 -3336.71
    P3W2 COMM CNTRL TAM 273 -1376.68
    P3W3 COMM CNTRL TAM 273 19707.42
    P3W4 COMM CNTRL TAM 273
    P3W5 COMM CNTRL TAM 273
    P3W1 Damon Walters -609.07
    P3W2 Damon Walters 30030.24
    P3W3 Damon Walters 37475.1
    P3W4 Damon Walters
    P3W5 Damon Walters Edited by: polasa on Oct 28, 2008 6:42 PM

    Sure, in a Single SQL ->
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:00.01
    satyaki>
    satyaki>
    satyaki>-- Start Of Test Data --
    satyaki>with week_tab
      2  as
      3    (
      4      select 1 period_num, 1 week_num, 10 bkg1 from dual
      5      union all
      6      select 1, 2, 40 from dual
      7      union all
      8      select 1, 3, 30 from dual
      9      union all
    10      select 1, 2, 20 from dual
    11      union all
    12      select 1, 1, 10 from dual
    13      union all
    14      select 1, 1, 20 from dual
    15      union all
    16      select 1, 3, 10 from dual
    17      union all
    18      select 2, 1, 15 from dual
    19      union all
    20      select 2, 2, 20 from dual
    21      union all
    22      select 2, 3, 10 from dual
    23      union all
    24      select 2, 1, 15 from dual
    25      union all
    26      select 2, 2, 30 from dual
    27      union all
    28      select 2, 3, 20 from dual
    29    )
    30  -- End Of Test Data --
    31  select period_num,
    32         week_num,
    33         (
    34            select sum(week_tab.bkg1)
    35            from week_tab
    36            where period_num = m.period_num
    37            and   week_num   = m.week_num
    38            group by week_num, period_num
    39         ) sum_bkg1
    40  from (
    41        select dum.week_num,
    42              wk.period_num
    43        from (
    44                select 1 week_num from dual
    45                union all
    46                select 2 from dual
    47                union all
    48                select 3 from dual
    49                union all
    50                select 4 from dual
    51                union all
    52                select 5 from dual
    53              ) dum ,
    54              (
    55                select distinct period_num
    56                from week_tab
    57          ) wk
    58      ) m;
    PERIOD_NUM   WEEK_NUM   SUM_BKG1
             1          1         40
             1          2         60
             1          3         40
             1          4
             1          5
             2          1         30
             2          2         50
             2          3         30
             2          4
             2          5
    10 rows selected.
    Elapsed: 00:00:00.48
    satyaki>Regards.
    Satyaki De.

  • I want to get the values from the second hiphen only

    Hey Guys,
    I have one column and the data like this
    col1 = 'AI463-901-001'
    Now,
    I want to get the values from the second hiphen only(any no. of values).
    Please can any one help me on this .
    Thanks in advance!
    Regards,
    -LK

    you have a mistake
    you result is -001
    this is right
      select substr('AI463-901-001',instr('AI463-901-001','-',1,2)+1) from dual;
      -- @user11928732 -  if you are using Oracle Database 11g, ttry this please
    with data as
      (select  'AI463-901-001'from dual)
      select substr(str,instr(str,'-',1,2)+1) from data;
      select substr(<YOUR COLUMN>,instr(<YOUR COLUMN>,'-',1,2)+1) from <YOUR TABLE>;result is : 001
    Edited by: Mahir M. Quluzade on May 3, 2011 5:37 PM

  • Get unique value for a range of values from a table

    Please help to identify the sql to get unique value for following scenario
    Table A has 3 columns
    column1 column2 column3

    user7666373 wrote:
    Please help to identify the sql to get unique value for following scenarioUnique combinations of three columns? If so:
    select DISTINCT column1,column2,column3 from A;SY.

  • How to get the values for checked and unchecked chekboxes

    Hai i have using the checkbox in for loop.
    I need the urgent help from anyone,
    for example in the loop there is having 5 checkbox if i checked 3 of the ckeckboxes and 2 of the checkboxes are unchecked. I need to get the values for checked checkboxes and unchecked checkboxes. Because if i checked the checkboxes, those values need to be inserted into the database. Those for unchecked checkboxes values need to be deleted from the database. Can anyone help me for this
    i am using the following jsp code for this. If anyone can know about this please post me the sample code.
    <form name="confirmcontainer" id="confirmcontainer" method="post" action="submit.jsp">
    <% for(int i=0;i<value.length;i++) {%>
    <tr>
    <td><input name="assigncontainer_chkbox" d="assigncontainer _chkbox" type="checkbox" value="<%=value[0]%>"></td>
    <td class="bottomborder"><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=value[1]%> </font></div></td>
    <td bgcolor="#FFFFFF" class="bottomborder"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=value[2]%></font></td>
    </tr>
    <% } %>
    <tr><td><input type="submit" name="submit" value="submit"> </td></tr>
    </form>
    Thanks & Regards,
    Tamilvanan

    Hey thanks Alex and Catastrophe for the quick response...
    I'll be sitting with the functional team and reviewing the roles created.
    Thanks for all the help once more
    Regards,
    Akash.

  • How to get the values for the Authorization Object Fields....

    Hi Everyone,
    I'm pretty new to the SAP Security and have been working on the Basis sides...I created a new role in PFCG and added a few transactions (ME13) and clicked on the Authorizations tab. In there, the authorization tree is in yellow and red. After providing the Org Values, only the yellow lights remain (apart from the green one ofcourse). Now how do we get the values for the different auth obj fields that are in yellow... say for example
    Conditions                                                   COND
    Maintain Condition: Auth. for Use/Appl./Cond.Type/Table      V_KOND_VEA
    Activity                       03                                                                        ACTVT
    Application                                                                                KAPPL
    Condition table                                                                                KOTABNR
    Condition Type                                                                                KSCHL
    Usage of the condition table                                                                 KVEWE
    Here the values for V_KOND_VEA fields e.g. KAPPL, KOTABNR etc are missing.
    My question is how do we get these values in regard to the requirement provided by the client...is it the functional guys who provide these values or else how is a security person supposed to know it...
    All the help in this regard is sincerely appreciated along with the awarding of points...

    Hey thanks Alex and Catastrophe for the quick response...
    I'll be sitting with the functional team and reviewing the roles created.
    Thanks for all the help once more
    Regards,
    Akash.

  • I want to get an app for my macbook pro where I can buy sheet music.

    I want to get an app for my macbook pro where I can purchase sheet music such as Demi Lovato, Beyonce etc.

    Check the App Store.  If not there, do a Google search. 

Maybe you are looking for

  • Apple ID disabled - any ideas?

    About two weeks ago my wife noticed a duplicate charge on our credit crard from iTunes in the amount of 63.59.  We thought it was a dup and made the mistake of have the credit card cancel the dup charge.  After checking my iTunes account I realized t

  • Wifi issues maybe solved

    Make sure your router is channel on 11 (or the highest it could go possibly) not auto detect and that your WMM is enabled. Solved it for me, tried deleting the phone and backing it up again, resetting network settings and even tried a soft reset.. Ma

  • The features you are trying to use is on a network resource that is unavailable

    I get this msg when trying to re load  i tunes. it says the above msg and also says enter an alternate path to a folder containing the installation package 'i tunes.msi' in the box below

  • Update item characteristic values using BAPI_SALESORDER_CHANGE

    Hi Experts, Could anyone give me sample code on how to update the characteristic values of a sales order item? Points will be awarded... Thanks! Regards, LM

  • ITunes has gone crazy in Mountain Lion - HELP!

    I just upgraded to Mountain Lion, and now iTunes appears to take over my computer whenever I have my iPhone, iPod or iPad attached. If I switch to another app, the computer switches back to iTunes after a few seconds. If I quit iTunes, it starts up a