ALV-Report modify/update for specific Biz Area

Hi, can any one help for below requirement.
Requirement: In My ALV report DESIGNATION is one of the field. In this field Employee position( like manager, vice president) is displyaing. Now my requirement is instead of position I have to Display Employee sub group Description(PTEXT). This report is used by different pay role areas, But i have to chage this for only one specific payroll area. Remaining payroll ares will use same one without any changes. Pls can any one help out this one.
Thanks in Advance.

Why cant you use such a simple condition like this in your program?
if itab-payarea = 'AAA'.   -> your specific payroll area
itab-designation = subgroup text.
else.
itab-designation = position.
endif.

Similar Messages

  • Ipad mini with retina-- apps crashing on ios 8. Even apps updated for ios 8 are also crashing

    AFter updating my ipad mini retina to ios 8, apps already updated for ios 8 are crashing like...scanner pro by readdle,
    safari not working as well as on ios7.1.2.

    sarathi94 wrote:
    Wish Apple fix issues soon !  
    Me too. I've been an Apple fan for a long time but things are starting to get painful. I hate telling people not to upgrade but I can't honestly recommend otherwise.
    A bad thing is that these problems are not predictable. I have an iPad Mini - no retina that I got for free for opening a new bank account. I am a developer so I have run it on iOS 8 for some time. Even the released version has annoying bugs that weren't there on iOS 7. While the performance isn't great, it is useable. But a retina would have higher requirements and perhaps iOS 8 makes your machine too slow.
    Do try all of the resetting and troubleshooting techniques. They may help.

  • Stock updated for specific plant.

    Hi
    I want the stock report for specific plant where I can see the stock updated date rather than posting date.
    Thanks,
    Kiran

    Hi Yogesh,
    You are right. I want the last date when the inventory of material changed
    For example
    Material Code        |  Plant  |  Last date of inventory changed.
    Thanks,
    Kiran

  • Depreciation run for specific depreciation area

    Hi,
    In AA, we defined 2 depreciation area for all the assets class, one for local(01), another one for group(30). all the area will be posted to FI.
    according to requirement, we would like to stop specific depreciation area depreciation run for certain asset(not asset class). this means that for depreciation area 01, it will be work, but for 30, it should be stopped. may be 3 months later, this asset will be restart run depreciation for area 30.
    Would anyone know how to do that? thanks.
    Ben

    Hi
    Hope you have to change the Config settings then.
    Go to AO21 and select your screen layout and double click Field Group rules and under FG 18 you have Deactiv. area make this enrty optional and also select the check box MnNo.
    Save the entry.
    Come back to AS02,now the dep area will be available for deactivation.
    Good Luck
    Hari

  • Can I schedule iMovie update for specific time?

    Apple OS X Mavericks question:
    Having been a loyal Microsoft Windows user since the beginning in 1985, I just recently gave up and moved to an Apple MacBook Pro (Microsoft really messed up with Win 8, IMO).
    I really like the machine and OS X.
    My question: Does anyone know if you can schedule application updates for a particular time on OS X Mavericks? I must use satellite broadband which has data limits except after 2 AM. I have an application update for iMovie which is 1.97 GB in size and my broadband allotment per day is only 1 GB total (during normal hours before 2 AM).
    I would like to schedule the update for the unlimited hours after 2 AM if this is possible.
    It appears this may not be an option on OS X, from what I have been able to find.  Sorry if this is a "stupid" question.  After 29 years of being a Windows power user, it is strange to be a neophyte again! :-)
    Thanks in advance for any ideas!

    I have this same problem, and posted about it this early this week, at that time I did not see this solution. Here is how I solved the problem - I mostly use Linux so this is a Mac unix solution.
    From darwin ports I installed wget.
    Using the apple support download site I selected each update I needed, started the download then immediately canceled the download. In the downloads window I right clicked on the download to get the url.
    With the text editor I created a shell script and placed the wget command with the url.
    Here is my example script for the updates to iTunes and GarageBand
    #! /bin/sh
    PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/cow:/us r/local/bin:/usr/X11/bin
    cd /Users/cow/Downloads
    wget http://supportdownload.apple.com/download.info.apple.com/AppleSupport_Area/Apple_Software_Updates/Mac_OS_X/downloads/061-4294.20080303.B5T3a/G arageBand412.dmg
    wget http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iTunes7/Mac/061-4 265.20080221.MscTs/iTunes.dmg
    exit 0
    Save the script in some location like Documents as updates.sh From the terminal do a chmod ugo+rx updates.sh
    Then add the script to crontab with the terminal enter crontab -e (It will use vi as the editor) My Entry is:
    10 03 * * * /Users/cow/Documents/updates.sh
    The next day just comment out your crontab entry.
    This will work for all kinds of updates, also good for getting large packages from darwin ports.

  • Reports for specific sales areas

    Hi,
    I am looking for standard reports for the following from areas:
    1. Sales Document Schedule Line
    2. Sales-Shipping Allocation Schedule Line
    3. Sales Document Header Status
    4. Billing Document Item Data
    5. Delivery Item Data
    I have looked at the Information System for SD reports, but they don't seem to be the ones I would want to use. Are there reports to display these areas separately or altogether for large volume reporting?
    Thanks

    Hi,
    Please check transaction SD01.
    SAP Easy Access Sales and Distribution:
    Sales -> Inquiries, Quotations, Orders, Scheduling Agreements, Contracts etc.
    Click on Inquiries for standard reports on Inquiries,
    Click on quotations for standard reports on quotations etc.
    Regards,
    Ferry Lianto

  • Hide Change Layout Button in ALV report o/p for MB52 Tcode

    Hi,
    Is it possible to Hide Change Layout Button in ALV output for Report MB52 using authoriztaion.
    We have created a layout in which we are hiding some coloumns which the user should not see.
    But if the change layout button is active then the user can add those coloumns to output.
    Is this possible through authorizations. I want to avoid doing any chnages to the std sap program.
    Thanks & Regards,
    Fawaz

    Check the object S_ALV_LAYO

  • IR Report to update filtered records that are checked - How To

    Hi,
    (APEX 4.0 on 10g)
    Simply stated, I have a IR Report with the followng
    select
    APEX_ITEM.CHECKBOX(1,empid,DECODE(selected_flag,'Y','CHECKED','') AS SELECTED,
    ename,
    job,
    selected_flag
    FROM emp
    ORDER BY 1
    The Interactive Report returns a 1000 records and none of the rows are selected (i.e. selected_flag is not 'Y'; I filter the report for last name = 'SMITH' which returns 100 rows.
    How do I refer to those or updated the SELECTED_FLAG of the 100 rows with the last name of 'SMITH' to 'Y'?
    Thanks in advance for your response.

    Hi,
    I don't know... it might be too late... but I came across this Problem too.
    The trick is to select the the value of the primary key instead of the checkbox value...
    something like this ...
    select apex_item.checkbox(1, pn_modulid, decode
    (V_SOMEVALUE 'J', 'checked', 'unchecked')) as "V_SOMEVALUE"
    and...
    apex_item.hidden(9,pn_modulid||',1:'||nvl(V_VALUE,'N')||',.... as checks
    in the IR.
    And then in the Process one can do something like this....
    nid NUMBER;
    nanz NUMBER;
    ncount NUMBER;
    vsql VARCHAR2 (32676);
    vvar VARCHAR2 (100);
    vvarray VARCHAR2 (1000);
    TYPE reccheckboxen IS RECORD (
    n_id NUMBER,
    v_varray VARCHAR2 (1000),
    v_varrayneu VARCHAR2 (1000)
    TYPE tapcheckboxen IS TABLE OF reccheckboxen
    INDEX BY BINARY_INTEGER;
    tcheckboxen tapcheckboxen;
    begin
    --this is the value of my array from the hidden select...
    FOR ds IN 1 .. apex_application.g_f09.COUNT
    LOOP
    vvarray := apex_application.g_f09 (ds);
    nid := SUBSTR (vvarray, 1, INSTR (vvarray, ',') - 1);
    tcheckboxen (nid).n_id := nid;
    tcheckboxen (nid).v_varray :=
    SUBSTR (vvarray, INSTR (vvarray, ',') + 1);
    tcheckboxen (nid).v_varrayneu :=
    REPLACE (tcheckboxen (nid).v_varray, 'J', 'N');
    END LOOP;
    FOR c IN 1 .. 7
    LOOP
    vsql :=
    'begin :ncount := '
    || 'apex_application.g_f'
    || LPAD (c, 2, '0')
    || '.count; END;';
    EXECUTE IMMEDIATE vsql
    USING OUT ncount;
    FOR v IN 1 .. ncount
    LOOP
    vsql :=
    'begin :vvar := '
    || 'apex_application.g_f'
    || LPAD (c, 2, '0')
    || '('
    || v
    || '); END;';
    EXECUTE IMMEDIATE vsql
    USING OUT vvar;
    tcheckboxen (vvar).v_varrayneu :=
    REPLACE (tcheckboxen (vvar).v_varrayneu,
    c || ':N',
    c || ':J'
    END LOOP;
    END LOOP;
    IF tcheckboxen.COUNT > 0
    THEN
    FOR verg IN tcheckboxen.FIRST .. tcheckboxen.LAST
    LOOP
    IF tcheckboxen.EXISTS (verg)
    THEN
    IF tcheckboxen (verg).v_varray <>
    tcheckboxen (verg).v_varrayneu
    THEN
    vsql :=
    'Update Table
    set value = :01 where pn_modulid = :id';
    EXECUTE IMMEDIATE vsql
    USING vvalue, id;
    END IF;
    END IF;
    END LOOP;
    END IF;
    end;
    I had 7 Checkboxes to check in my report.
    Works fine.... ;-)

  • Web Dynpro ALV disable column sort for specific column

    Hi,
    I have the above mentioned problem. The Coding I use is:
    DATA:  lr_field_settings  TYPE REF TO if_salv_wd_field_settings,
                lt_fields          TYPE SALV_WD_T_FIELD_REF.
    FIELD-SYMBOLS:  <fs_field>  LIKE LINE OF lt_fields.
    lr_field_settings ?= lr_config.
    lt_fields = lr_field_settings->get_fields( ).
    READ TABLE lt_fields ASSIGNING <fs_field> WITH KEY fieldname = 'ANSPRECH_DETAILS'.
    IF sy-subrc EQ 0.
      <fs_field>-r_field->if_salv_wd_sort~set_sort_allowed( abap_false ).
      <fs_field>-r_field->if_salv_wd_sort~set_grouping_allowed( abap_false ).
    ENDIF.
    When debugging I can see that the object attributes for sort_allowed and grouping_allowed are changed from 'X' to ' '
    but the running application still allows sorting and grouping for the column 'ANSPRECH_DETAILS'.
    So what did I forget or what is my mistake ????
    Thx for your help.
    Dino Dini

    I got the similar requirement and I tried to do the below way.. it worked for me..
    DATA: lr_field_settings TYPE REF TO if_salv_wd_field_settings.
    DATA: lr_field TYPE REF TO cl_salv_wd_field.
    lr_field_settings ?= lr_table.
    lr_field = lr_field_settings->get_field( 'MATNR' ).
    lr_field->IF_SALV_WD_SORT~SET_SORT_ALLOWED( abap_false
    you can observe in the below image that sort option is not enabled for MATNR in the ALV.

  • SQL Report - Software count for specific hostnames

    Hi all,
    I'm currently using the below query to get the count of all software in Add/Remove Programs for a specific collection:
    Declare @CollID char(8)
    Set @CollID = 'XXX00001'
    SELECT DisplayName0, Count(*) AS 'Count', Publisher0, Version0, @CollID as CollectionID
    FROM v_Add_Remove_Programs arp
    JOIN v_FullCollectionMembership fcm on arp.ResourceID=fcm.ResourceID
    WHERE fcm.CollectionID = @CollID and
    GROUP BY DisplayName0, Publisher0, Version0
    ORDER BY Publisher0, Version0
    Now, what I would like to do is to specify the All Systems collection ID (not a problem) but add a couple of extra condition:
    I want to run the query only WHERE the hostnames start with SITE1 or SITE2.
    How can I modify the above to achieve the results I'm expecting? I'm getting stuck here and there :(
    Thanks a lot

    Thanks Torsten, you put me on the right direction.
    If somebody's interested, this is the query I'm running now:
    Declare @CollID char(8)
    Set @CollID = 'XXX00001'
    SELECT DisplayName0, Count(*) AS 'Count', Publisher0, Version0, @CollID as CollectionID
    FROM v_Add_Remove_Programs arp
    JOIN v_FullCollectionMembership fcm on arp.ResourceID=fcm.ResourceID
    JOIN v_R_System_Valid rsv on arp.ResourceID=rsv.ResourceID
    WHERE fcm.CollectionID = @CollID and rsv.Netbios_Name0 LIKE '%SITECODE1%' GROUP BY DisplayName0, Publisher0, Version0
    ORDER BY Publisher0, Version0

  • Issue in creating Finish Good Material for specific sales area

    I am trying to create a new "finished good material" through "MM01" , after selecting  "industory sector" & "Material type" I have also selected the views the next screen comes is for Organization level ,
    when I select Plant , sales org & distribution channel and press enter an error comes "Company Code 1000 is not set up for Material Managment".
    please help me out.

    hi,
    Check few things:
    1. Check whether the plant is assigned to the co.code which it is showing and the Material is maintained for the same plant...
    2. Check whether there is proper assignment of the porg to co.code
    Porg to plant, etc...
    If plant is not assigned to cocode then assign it in OX18....
    Or
    If you are using the IDES, then try with the other plant and material...
    Regards
    Priyanka.P

  • "Go to Report" action fails for specific user.

    Hi all,
    I have Sharepoint 2010 in Integrated Mode with Reporting Services 2008 R2 running in ReportViewer webparts.
    In many reports I have a "Go to Report" action that work fine.
    Until now all of our users were able to use the "Go to Report" action. However, now for the first time there is a user that is not taken to the target report, but instead is taken to the site default page (the url that is also displayed when I
    mouse-over the link). I have tested and in my browser (same version) it works ok.
    Is there a setting in IE9 that can prevent or interrupt the Go to Report action?
    Many thanks. 
    Jacco Bloemendaal

    Hi Jacco,
    Please check if this issue also persist in other browser. It is may be due to compatibility issue. Please refer to the following steps to set browser open all intranet sites with Compatibility View mode automatically.
    1. Launch the IE 9, and press Alt+T to select the Tools.
    2. Click Compatibility View settings.
    3. Check the “Display intranet sites in Compatibility View” option, and click Close.
    There is a similar issue, you can refer to it.
    https://connect.microsoft.com/SQLServer/feedback/details/671138/ssrs-2008-r2-sharepoint-2010-ie9-no-export-submenus
    Hope this helps.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • The bookmark icons for specific sites are gone. How do I get them back.

    The text of the bookmark is ok, but the little icon is a blank box. What happened?

    Do you still see the favicon on the Tab bar if you open such a bookmark in a Firefox tab?
    Websites that do not have a favicon show an empty square instead in current Firefox versions.
    You can check for problems with the places.sqlite database file in the Firefox Profile Folder.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    *https://support.mozilla.org/kb/Bookmarks+not+saved#w_fix-the-bookmarks-file

  • CC showing updates for CC apps that are NOT part of my subscription

    Ok,
    Aside from the massive annoyance with the duplicate versions (why didn't they just include both plugin system for a couple of versions?), I've got "updates" for apps that are NOT part of my CC subscription showing up.  I have a full suite of CS6 installed, but only the Photographers bundle for CC.  Yet I'm showing Illustrator and InDesign CC (2014) as available.  It also shows TWO lightroom 5's - one up to date, and one that needs an update.
    What gives?

    That still doesn't explain why I'm seeing two different lightroom installations in the CC list - one up to date, and one that's available.  I've previously installed/updated Lightroom through CC by the way.  But when I do run Lightroom it also prompts me to upgrade (which I haven't done either).  Something looks badly broken in the LR update process.
    And it doesn't address the available updates for applications (InDesign and Illustrator CS6) that aren't part of my CC subscription.  Since I'm now at the mercy of the CC licensing servers, I'm rather hesitant to risk corrupting my entitlements by doing anything until I understand why my entitlements are incorrect.
    Can you help me understand why they are incorrect?

  • Validation in alv report

    Hi friends i am new to abap.i am doing some validation in my report .my program is executing properly but i need  some modification.... its alv report on bapi for GOODS MOVEMENT TYPE For tht i am uploading a flat file using gui_upload.but i need some modification on validation..this program is abt goods transfer from one plant to another plant,s location .so in my flat file i am having material,from plant ,from location,to plant,to location and quantity .here is the code:
    *&      Form  VALIDATE_DATA
    1.Check Material in Table MARC >> Material Plant Validation
    If not found, Fill Remarks with 'Material Not Found in Plant'
    2.Check Plant is Assigned to POrg in Table T024W >> Plant POrg Validation
    If not found, Fill Remarks with 'Invalid POrg for Plant'
    3.Check Location for Plant and Location in Table T001L >> Plant SLoc Validation
    If not found, Fill Remarks with 'Invalid Storage Location for Plant'
    FORM validate_data .
      DATA: lv_ekorg TYPE t024e-ekorg.
    Get POrg for CompanyCode
      SELECT SINGLE ekorg INTO lv_ekorg FROM t024e
            WHERE bukrs EQ p_bukrs.
      LOOP AT it_final.
    Check-1
        SELECT SINGLE * FROM marc
                        WHERE matnr = it_final-matnr
                          AND werks = it_final-f_werks.
        IF sy-subrc = 4.
          it_final-remark = 'Material Not Found in Plant'.
          MODIFY it_final.
        ELSE.
    Check-2
          SELECT SINGLE * FROM t024w
                       WHERE werks = it_final-t_werks
                         AND ekorg = lv_ekorg.
          IF sy-subrc = 4.
            it_final-remark = 'Invalid POrg for Plant'.
            MODIFY it_final.
          ELSE.
    Check-3
            SELECT SINGLE * FROM t001l
                                 WHERE werks  = it_final-t_werks
                                  AND lgort = it_final-t_lgort.
            IF sy-subrc = 4.
              it_final-remark = 'Invalid Storage Location for Plant'.
              MODIFY it_final.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " VALIDATE_DATA
    for this code i am getting output as if plant value is wrong then there will be a remark in the output as material is 'Material Not Found in Plant'....and as same for location n purchase organization....
    But in my output i want ,if there is plant n location is wrong the then 2 remarks should display in 2 rows but like wise now i am getting only one remark for 2 errors also..........getting  remark based on first condition....
    can any one help me hw to solve ...

    *& Report  YSG_IM_F2_002                                               *
    *&   This object is  for goods transfer from one plant to another      *
    *&   plant using FM-BAPI_GOODSMVT_CREATE                               *
    REPORT  YSG_IM_F2_002                           .
    TABLES: marc, t024w, t001l.
    TYPE-POOLS:slis.
    TYPES:  BEGIN OF i_list,
            matnr LIKE mard-matnr,
            f_werks LIKE mard-werks,
            f_lgort LIKE mard-lgort,
            t_werks LIKE mard-werks,
            t_lgort LIKE mard-lgort,
            labst LIKE mard-labst,
            remark TYPE c,
           END OF i_list.
    TYPES: BEGIN OF i_mara,
           matnr LIKE mara-matnr,
           END OF i_mara.
    TYPES:BEGIN OF i_marc,
          matnr LIKE marc-matnr,
          werks LIKE marc-werks,
          END OF i_marc.
    TYPES: BEGIN OF i_mard,
            matnr LIKE mard-matnr,
            f_werks LIKE mard-werks,
            f_lgort LIKE mard-lgort,
            t_werks LIKE mard-werks,
            t_lgort LIKE mard-lgort  ,
            labst LIKE mard-labst,
            END OF i_mard.
    TYPES: BEGIN OF i_t001l,
           bukrs TYPE t001l-werks,
           lgort TYPE t001l-lgort,
           END OF i_t001l.
    TYPES: BEGIN OF i_t024e,
           ekorg TYPE t024e-ekorg,
           bukrs TYPE t024e-bukrs,
           END OF i_t024e.
    TYPES: BEGIN OF i_mkpf,
           xblnr type mkpf-xblnr,
           END OF i_mkpf.
    TYPES: BEGIN OF i_final,
           matnr LIKE mard-matnr,
           f_werks LIKE mard-werks,
           f_lgort LIKE mard-lgort,
           t_werks LIKE mard-werks,
           t_lgort LIKE mard-lgort,
           labst type c ,
           remark(50) type c,
          END OF i_final.
    DATA : filename TYPE string,
           title type c.
    DATA: it_list TYPE STANDARD TABLE OF i_list WITH HEADER LINE,
          it_mara TYPE STANDARD TABLE OF i_mara WITH HEADER LINE,
          it_marc TYPE STANDARD TABLE OF i_marc WITH HEADER LINE,
          it_mard TYPE STANDARD TABLE OF i_mard WITH HEADER LINE,
          it_t001l TYPE STANDARD TABLE OF i_t001l WITH HEADER LINE,
          it_t024e TYPE STANDARD TABLE OF i_t024e WITH HEADER LINE,
          it_mkpf TYPE STANDARD TABLE OF i_mkpf WITH HEADER LINE,
          it_final TYPE STANDARD TABLE OF i_final WITH HEADER LINE.
    DATA: fs_fldcat TYPE slis_fieldcat_alv ,   "Structure for Field catalog
          it_fldcat LIKE TABLE OF fs_fldcat,
          layout    TYPE slis_layout_alv,
          V_REPID   LIKE sy-repid.
    DATA: GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER,
          EVENTS TYPE SLIS_T_EVENT,
          GW_EVENT       TYPE SLIS_ALV_EVENT,
          GI_LISTHEADER  TYPE SLIS_T_LISTHEADER.
    DATA: lv_matnr TYPE mara-matnr,
          lv_ekorg TYPE t024e-ekorg.
    DATA: BEGIN OF gmhead.
            INCLUDE STRUCTURE bapi2017_gm_head_01.
    DATA: END OF gmhead.
    DATA: BEGIN OF gmcode.
            INCLUDE STRUCTURE bapi2017_gm_code.
    DATA: END OF gmcode.
    DATA: BEGIN OF mthead.
            INCLUDE STRUCTURE bapi2017_gm_head_ret.
    DATA: END OF mthead.
    DATA: BEGIN OF itab OCCURS 100.
            INCLUDE STRUCTURE bapi2017_gm_item_create.
    DATA: END OF itab.
    DATA: BEGIN OF errmsg OCCURS 10.
            INCLUDE STRUCTURE bapiret2.
    DATA: END OF errmsg.
    *data: wmenge like iseg-menge,
         errflag.
    *Selection Screen Declaration
    SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME TITLE text-001.
    PARAMETERS: p_bukrs LIKE t024e-bukrs OBLIGATORY,
                ekorg LIKE t024e-ekorg,
                f_file LIKE ibipparms-path OBLIGATORY,
                xblnr like mkpf-xblnr,
                Doc_Post type checkbox.
    SELECTION-SCREEN END OF BLOCK blk .
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR f_file .
      CLEAR f_file.
      CALL FUNCTION 'F4_FILENAME'
       EXPORTING
         PROGRAM_NAME  = .
         DYNPRO_NUMBER = SYST-DYNNR
        IMPORTING
          file_name     = f_file.
    START-OF-SELECTION.
      filename = f_file.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = filename
          filetype                = 'ASC'
          has_field_separator     = 'x'
        TABLES
          data_tab                = it_final
        EXCEPTIONS
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          OTHERS                  = 17.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      PERFORM validate_data.
      PERFORM bapi_goods_mvt.
      PERFORM alv_grid_display.
    endif.
    PERFORM BAPI_GOODS_MVT.
    *&      Form  VALIDATE_DATA
    1.Check Material in Table MARC >> Material Plant Validation
    If not found, Fill Remarks with 'Material Not Found in Plant'
    2.Check Plant is Assigned to POrg in Table T024W >> Plant POrg Validation
    If not found, Fill Remarks with 'Invalid POrg for Plant'
    3.Check Location for Plant and Location in Table T001L >> Plant SLoc Validation
    If not found, Fill Remarks with 'Invalid Storage Location for Plant'
    FORM validate_data .
    Get POrg for CompanyCode
      SELECT SINGLE ekorg INTO lv_ekorg FROM t024e
            WHERE bukrs EQ p_bukrs.
      LOOP AT it_final.
    Check-1
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = it_final-matnr
          IMPORTING
            output = lv_matnr.
        SELECT SINGLE * FROM marc
                        WHERE matnr = lv_matnr
                          AND werks = it_final-f_werks.
         IF sy-subrc <> 0.
          it_final-remark = 'Material Not Found in Plant'.
          append it_final .
         endif  .
        SELECT SINGLE * FROM marc
                       WHERE matnr = lv_matnr
                         AND werks = it_final-t_werks.
         IF sy-subrc <> 0.
          it_final-remark = 'Material Not Found in Plant'.
          append it_final .
         endif.
    Check-2
          SELECT SINGLE * FROM t024w
                       WHERE werks = it_final-t_werks
                         AND ekorg = lv_ekorg.
          IF sy-subrc <> 0.
            it_final-remark = 'Invalid POrg for Plant'.
                  append it_final .
          Endif.
          SELECT SINGLE * FROM t024w
                       WHERE werks = it_final-f_werks
                         AND ekorg = lv_ekorg.
          IF sy-subrc <> 0.
            it_final-remark = 'Invalid POrg for Plant'.
                 append it_final .
          Endif.
    Check-3
            SELECT SINGLE * FROM t001l
                                 WHERE werks  = it_final-t_werks
                                  AND lgort = it_final-t_lgort.
            IF sy-subrc <> 0.
              it_final-remark = 'Invalid Storage Location for Plant'.
                    append it_final .
            ENDIF.
            SELECT SINGLE * FROM t001l
                                  WHERE werks  = it_final-f_werks
                                   AND lgort = it_final-f_lgort.
            IF sy-subrc <>  0.
              it_final-remark = 'Invalid Storage Location for Plant'.
                   append it_final .
            ENDIF.
         ENDIF.
       ENDIF.
      ENDLOOP.
    ENDFORM.                    " VALIDATE_DATA
    *&      Form  ALV_GRID_DISPLAY
          text
    FORM alv_grid_display.
      DATA:l_edit TYPE lvc_s_glay.
      PERFORM build_fieldcat.
      PERFORM layout_build  USING layout.
      PERFORM fill_list_header USING gi_listheader.
      v_repid = sy-repid.
      gw_event-name = slis_ev_top_of_page.
      gw_event-form = 'TOP_OF_PAGE'.
      APPEND gw_event TO events.
      l_edit-edt_cll_cb = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = V_REPID
        i_callback_pf_status_set          = 'SET_PF_STATUS'
       I_CALLBACK_USER_COMMAND           = ' '
       I_CALLBACK_TOP_OF_PAGE            = ' '
        i_grid_title                      = title
       I_GRID_SETTINGS                   =
         is_layout                         = layout
         it_fieldcat                       = it_fldcat
         i_save                            = 'x'
       IS_VARIANT                        =
        IT_EVENTS                         = events
        TABLES
          t_outtab                          = it_final
       EXCEPTIONS
         program_error                     = 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.
    ENDFORM.                    "ALV_GRID_DISPLAY
    *&      Form  build_fieldcat
          text
    FORM build_fieldcat.
      PERFORM fieldcat  USING: 'IT_FINAL'       "Internal table name
                               'MATNR'         "CREDIT CONTROL AREA
                               '10'             "length
                               'MATERIAL'   "Description
                               'L'             "Dictionary long text
                               ' '             "Database table name
                               ' '             "Database tab' field name
                               ' '             "Justification R/M/L
                               ' '             "To do total
                               ' '             "emphasize
                               ' '             "emphasize
                               ' '             "emphasize
                               ' '            "Data type
                               ' '            "edit.
                               ' '.          "round
      PERFORM fieldcat USING: 'IT_FINAL'       "Internal table name
                               'F_WERKS'         "CREDIT CONTROL AREA
                               '10'             "length
                               'FROM PLANT'   "Description
                               'L'             "Dictionary long text
                               ' '             "Database table name
                               ' '             "Database tab' field name
                               ' '             "Justification R/M/L
                               ' '             "To do total
                               ' '             "emphasize
                               ' '             "emphasize
                               ' '             "emphasize
                               ' '            "Data type
                               ' '          "edit.
                               ' '.          "round
      PERFORM fieldcat  USING: 'IT_FINAL'       "Internal table name
                                'F_LGORT'         "CREDIT CONTROL AREA
                                '10'             "length
                                'LOCATION'   "Description
                                'L'             "Dictionary long text
                                ' '             "Database table name
                                ' '             "Database tab' field name
                                ' '             "Justification R/M/L
                                ' '             "To do total
                                ' '             "emphasize
                                ' '             "emphasize
                                ' '             "emphasize
                                ' '            "Data type
                                ' '           "edit.
                                ' '.          "round
      PERFORM fieldcat USING: 'IT_FINAL'       "Internal table name
                                'T_WERKS'         "CREDIT CONTROL AREA
                                '10'             "length
                                'TO PLANT'   "Description
                                'L'             "Dictionary long text
                                ' '             "Database table name
                                ' '             "Database tab' field name
                                ' '             "Justification R/M/L
                                ' '             "To do total
                                ' '             "emphasize
                                ' '             "emphasize
                                ' '             "emphasize
                                ' '            "Data type
                                ' '           "edit.
                                ' '.          "round
      PERFORM fieldcat  USING: 'IT_FINAL'       "Internal table name
                              'T_LGORT'         "CREDIT CONTROL AREA
                              '10'             "length
                              'LOCATION'   "Description
                              'L'             "Dictionary long text
                              ' '             "Database table name
                              ' '             "Database tab' field name
                              ' '             "Justification R/M/L
                              ' '             "To do total
                              ' '             "emphasize
                              ' '             "emphasize
                              ' '             "emphasize
                              ' '            "Data type
                              ' '            "edit.
                              ' '.            "round
      PERFORM fieldcat USING: 'I_FINAL'       "Internal table name
                              'LABST'         "CREDIT CONTROL AREA
                                '10'             "length
                                'QUANTITY'   "Description
                                'L'             "Dictionary long text
                                ' '             "Database table name
                                ' '             "Database tab' field name
                                ' '             "Justification R/M/L
                                ' '             "To do total
                                ' '             "emphasize
                                ' '             "emphasize
                                ' '             "emphasize
                                ' '            "Data type
                                ' '            "edit.
                                ' '.           "round
      PERFORM fieldcat USING: 'I_FINAL'       "Internal table name
                                'REMARK'         "CREDIT CONTROL AREA
                                '50'             "length
                                'REMARK'   "Description
                                'L'             "Dictionary long text
                                ' '             "Database table name
                                ' '             "Database tab' field name
                                ' '             "Justification R/M/L
                                ' '             "To do total
                                ' '             "emphasize
                                ' '             "emphasize
                                ' '             "emphasize
                                ' '            "Data type
                                ' '            "edit.
                                ' '.           "round
    ENDFORM.                    "build_fieldcat
    *&      Form  fieldcat
          text
    FORM fieldcat  CHANGING value(p_tname)
                            value(p_fname)
                            value(p_length)
                            value(p_ltext)
                            value(p_typet)
                            value(p_rtab)
                            value(p_rfield)
                            value(p_just)
                            value(p_dosum)
                            value(p_emphasize)
                            value(p_datatype)
                            value(p_no_zero)
                            value(p_hotspot)
                            value(p_edit)
                            value(p_round).
      fs_fldcat-tabname       = p_tname.
      fs_fldcat-fieldname     = p_fname.
      fs_fldcat-outputlen     = p_length.
      fs_fldcat-seltext_l     = p_ltext.
      fs_fldcat-input         = p_typet.
      fs_fldcat-edit          = p_rtab.
      fs_fldcat-ref_fieldname = p_rfield.
      fs_fldcat-just          = p_just.
      fs_fldcat-do_sum        = p_dosum.
      fs_fldcat-emphasize     = p_emphasize.
      fs_fldcat-datatype      = p_datatype.
      fs_fldcat-lzero         =  p_no_zero.
      fs_fldcat-hotspot       = p_hotspot.
      fs_fldcat-edit          = p_edit.
      fs_fldcat-decimals_out = p_round.
      APPEND  fs_fldcat TO it_fldcat.
    ENDFORM.                    "fieldcat
    *&      Form  fill_list_header
          text
         -->FV_I_LISTHEADER  text
    FORM fill_list_header  USING fv_i_listheader TYPE slis_t_listheader.
    DATA: lw_line TYPE slis_listheader,
            l_date(10),
            l_time(10).
      DATA : p_date LIKE sy-datum.
      DATA : p_time LIKE sy-uzeit.
      DATA : ztext(17).
      DATA : ztext1(80).
      p_date = sy-datum.
      p_time = sy-uzeit.
       CLEAR fv_i_listheader.
      CONCATENATE p_date6(2) '.' p_date4(2) '.' p_date+0(4) INTO l_date.
      CONCATENATE p_time0(2) ':' p_time2(2) ':' p_time+4(2) INTO l_time.
    IF doc_post = 'X'.
        ztext = 'Execute Mode'.
      ELSE.
        ztext = 'Update Mode'.
      ENDIF.
       CLEAR lw_line.
      lw_line-typ  = 'H'.
      lw_line-info = sy-repid.
      APPEND lw_line TO fv_i_listheader.
       CLEAR lw_line.
      lw_line-typ  = 'H'.
      lw_line-info = l_date.
      APPEND lw_line TO fv_i_listheader.
       CLEAR lw_line.
      lw_line-typ  = 'H'.
      lw_line-info = l_time.
      APPEND lw_line TO fv_i_listheader.
       CLEAR lw_line.
      lw_line-typ  = 'H'.
      lw_line-info = sy-uname.
      APPEND lw_line TO fv_i_listheader.
       CLEAR lw_line.
      lw_line-typ  = 'H'.
      lw_line-info =  ztext.
      APPEND lw_line TO fv_i_listheader.
    endform.                    "fill_list_header
    *&      Form  top_of_page
          text
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = gi_listheader.
    ENDFORM.                    "top_of_page
    *&      Form  layout_build
          text
         -->LAYOUT     text
    FORM layout_build  USING layout TYPE slis_layout_alv.
    layout-box_fieldname     = 'BOX'.
      layout-zebra             = 'X'. " STRIPED PATTERN
      layout-numc_sum          = 'X'. " TOTALS FOR NUMC-FIELDS
      layout-no_keyfix         = ' '. " DO NOT FIX KEYCOLUMNS
      layout-colwidth_optimize = ' ' .
      layout-flexible_key      = ' '. " KEY COLUMNS MOVABLE,...
      layout-detail_popup      = ' '. " SHOW DETAIL IN POPUP
    ENDFORM.                    "layout_build
    *&      Form  BAPI_GOODS_MVT
          text
    FORM bapi_goods_mvt.
      DATA: dc_numner TYPE  bapi2017_gm_head_ret-mat_doc,
            dc_year TYPE  bapi2017_gm_head_ret-doc_year.
      clear: dc_numner, dc_year.
      if doc_post = 'X'.
        gmhead-pstng_date = sy-datum.
        gmhead-doc_date = sy-datum.
        gmhead-pr_uname = sy-uname.
        gmhead-REF_DOC_NO = it_mkpf-xblnr.
        gmcode-gm_code = '04'.   "04 - MB1B - Transfer Posting
        LOOP AT it_final.
          itab-move_type   = '301'.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              input  = it_final-matnr
            IMPORTING
              output = itab-material.
          itab-plant            = it_final-f_werks .
          itab-stge_loc         = it_final-f_lgort .
          itab-MOVE_PLANT       = it_final-t_werks .
          itab-move_stloc       = it_final-t_lgort .
          itab-entry_qnt        = it_final-labst .
          APPEND itab.
        ENDLOOP.
        CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
          EXPORTING
            goodsmvt_header             = gmhead
            goodsmvt_code               = gmcode
        TESTRUN                     = ' '
         IMPORTING
           goodsmvt_headret            = mthead
           materialdocument            = dc_numner
           matdocumentyear             = dc_year
          TABLES
            goodsmvt_item               = itab
        GOODSMVT_SERIALNUMBER       =
            return                      = errmsg.
        IF errmsg[] IS INITIAL.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
              wait = 'X'.
          LOOP AT it_final.
            it_final-remark = dc_numner.
            MODIFY it_final.
          ENDLOOP.
        endif.
      ELSE.
    clear errflag.
        LOOP AT errmsg.
          IF errmsg-type EQ 'E'.
            WRITE:/'Error in function', errmsg-message.
         errflag = 'X'.
          ELSE.
            WRITE:/ errmsg-message.
          ENDIF.
        ENDLOOP.
      endif.
    ENDFORM.                    "BAPI_GOODS_MVT

Maybe you are looking for

  • My iPad crashes every time I go to open a book that I purchased

    I purchased a book from the Barnes and Noble Library. It opened in my Nook App, but I much prefer the iBooks app. I only have four books, and three of them work fine. (One of them is also a Nook book downloaded in a similar way and it works fine.) Ho

  • Long text for line item appears twice in my PO form...

    Hello Experts, I am wondering why my long text for my 1st line item is appearing twice. In my PO, I only maintained a long text for my 1st PO line item appeards twice. below is my code: /E          ITEM_LINE_1 IZ           &EKPO-EBELP&,,&EKPO-TXZ01&

  • Idoc Missing On the ECC SAP System Side

    Hi All In my case an Idoc is being sent to the SAP ECC system from XI . I can see the message is successful in SXMB_MONI of XI, the message has a chequered flag , I also locate the IDOC in the IDX5 in the outbound entries . But I am not able to locat

  • Error R6034 When Loading a DLL

    Hi, I'm getting a R6034 error when I attempt to load a 3rd-party DLL into a CallLibraryFunctionNode: I figure it has to do with missing dependencies, but I'm having problems getting everything in order.  Using 'Dependency Walker', it lists 'ieshims.d

  • I web page errors on windows

    Hi, I have recently published my website, however when you view this on windows, the shadows around my text and certain pictures does not work. I get either a double picture or double text. Have a done something wrong?