Default print indicator tick in MIGO transaction

Hi all,
   I need to set the print indicator for 'Collective slip' ticked by default for all the documents created in MIGO. I have done output determination settings for the same. How to do this? Because what happens is that, sometimes user doesnt ticks the check box and ultimately output doesn't gets saved. When i try to tick it from display mode in MIGO, again output doesnt gets saved. And i am doing it in MB02. Is there a way out to set the indicator(Check box) default for all documents created in MIGO?
Thanks in advance.
Regards,
Raj.

Goto SU3,enter your userid,in parameter tab give NDR and maintain parameter values as X.
regards,
indranil

Similar Messages

  • MIGO - NDR print indicator default to unchecked

    We would like to default the 'print' box in MIGO to always be unchecked when a user goes into the transaction.  There will be times when the user will check the box to print a label; however this will not be often.  Today, if a user checks the box, backs out of MIGO, then goes back into MIGO the box remains checked.  It's like it remembers whatever was set in that box previously.
    We've tried playing with the user parameter of NDR being set to 'X' (capital), or being set to blank, but it's like the parameter is not being read at all.  The screen is only remembering what we did last when we re-execute the transaction.  We've also tried playing with the GET/SET parameters in SE51, program SAPLMIGO screen 0110 - but again no luck.
    Am I missing something being set somewhere for the NDR parameter to be read?  Any tricks to get this to always default to unchecked?
    Thank you for the suggestions.

    I worked with ABAP'ers and it looks like this change was already in the enhancement section:
    Program: LMIGOKH1
    ENHANCEMENT-POINT HEADER_DEFAULTS_SET_02 SPOTS ES_SAPLMIGO.
    Set print indicator
      GET PARAMETER ID 'NDR' FIELD ps_gohead-xnapr.
    We also have this:
    Program: LMIGOHG2
        CHECK lcl_migo_globals=>kernel->s_action-create = abap_true."       307284
         REPLACE
        SET PARAMETER ID 'NDR' FIELD gohead-xnapr.
    The even more strange (frustrating) thing is that if we set a break point at the SET indicator in program LMIGOHG2, then the logic is picked up based on the user Parameter - not based on the last value that was entered.  However, if a breakpoint is set at the "get" section - it does not work.
    I may be sending this one to SAP. Thank you for your suggestions.

  • MIGO,MB1B, print indicator should be default

    Hello
    MIGO and MB1B transcations, print indicator is not selecting automatically. why?
    background:
    In user profile (SU01D), paramater NDR was maintianed correctly.
    eventhough user is having NDR parameter, but he is not able to see the print indicator automatically??
    in additioon , if they give manually print indicator for individual slip /collective silp, out is saved. and output is displayed in green color in GR iteam leavel "Message" tab.It means output setting are correctly maintained.
    even i tested with my user id..if i dlete the NDR to my id, it is not working.
    again i added NDR parameter, now it is correctly.
    Question: In production already user was maintained with NDR parameter, but he is not able to see the print automatically.
    so shall i delete his NDR parameter once  and add again?? this will be work or not ?? please confirm.
    Regards,
    Pabbati Obulesu

    Hi,
    NDR parameter value should be upper case X.
    Pls check your user parameter.
    Regards,
    Renuga.A

  • Default value in MIGO transaction for PLANT specific

    Hi Experts,
    I am looking for default vaule in MIGO transaction.
    Whenever goods receipt is entered for one particular PLANT ,i want vaule to be dafaulted in Quantity tab No.of container unit value to be PC for english and ST for german.
    Is is possible to achiece by creating new role ? if then how ?
    Note : It is for PLANT specific and for only one user.
    Thanks

    >
    Dhina wrote:
    > Is is possible to achiece by creating new role ? if then how ?
    This is not possible using security.  You will be able to do it via some form of customisation but you need to judge whether is it worth it.

  • Add New Transaction code at OMBR - Version Print Indicator

    Hello
    I need to add one transaction in the Version Print Indicator List. I know it can be done.
    Can any one guide me  how to do, as "New entries" is grey there. ( To best of my knowledge it is done through some other route or means)
    Regards

    Hi,
    Use t.code SE16.
    Enter table name T158 and press F5.
    This will allow you to add new transactions to the table.
    Nir

  • Two separate Print out while MIGO transaction

    All,
    While doing MIGO, internal batch numbers are generated .
    While doing this transaction a GR slip is printed out with batch number , production date , expiry date , material code and many other informations with output type WE01.
    Now  business want while doing this transaction , a separate print out with only batch number , Production date and expiry date .
    These two separate print outs should automatically come while MIGO transaction .
    1. Is this possible ?
    2. If possible , which output type will be for the 2nd print out .?
    2. Any user exit required here?
    Kindly advise.
    regards

    Hi Sandeep
    1) Inventory Mgmt IMG->Output Determ..->Maintain output types
    Copy WE01 and create a new output type ZWE01.
    In processing routines, you need to change the program/form for your new output. Discuss with your ABAPer for this.
    2) In 'Maintain Output determination procedure', insert this new output type in 'Control'
    3) Maintain conditions as required
    After this, use WE90 to print both outputs.
    Best regards
    Ramki

  • Hide Special Stock Indicator in MIGO transaction

    Hi Experts
    How to Hide the Special Stock Indiator field in MIGO transaction?
    Thanks in Advance
    Senthilnathan
    Edited by: Senthil Nathan on Dec 30, 2008 7:22 AM

    Hi Kunal
    Could please brief the steps to be followed in SHD0 transaction
    Because i am not able to display the MIGO transaction there
    Thanks in Advance
    Senthilnathan

  • GR slip printting issue in TC migo.

    Hi All,
    i'm trying to setup printer, i have done all setting but still i'm unable to get the GR Reciepts printout in MIGO. any body can help me please.
    khan

    Pls check the below settings for material document Print out:
    1. Maintain the Printer Name in SPRO->Matl Mgmt->Inv Mgmt and Phy Inv->Print Control->Gen Settings->Printer Setting
    2. Ensure that in SPRO->Matl Mgmt->Inv Mgmt and Phy Inv->Print Control->Gen Settings->Item Print Indicator, 1 stands for Matl Doc print out
    3. In SPRO->Matl Mgmt->Inv Mgmt and Phy Inv->Print Control->Gen Settings->Print Version, maintain Print Version 2
    4. In SPRO->Matl Mgmt->Inv Mgmt and Phy Inv->Print Control->Maintain Print Indicator for GI/Transfer Posting Documents
    5. In SPRO->Matl Mgmt->Inv Mgmt and Phy Inv->Output Determination->Maintain Output Types, for the Output types WE01, WE02 and WE03, ensure the foll:
    a. Default Values: Dispatch Time is 3 or 4 as per reqmt. and Tr medium is 1
    b. Print Parameter is 7
    6. In SPRO->Matl Mgmt->Inv Mgmt and Phy Inv->Output Determination->Printer Det->Pr Det by Pl/StoLoc, maintain the Output device for all your Plants
    7. Go to MN21, for Tr Type WE, Print Version 3, maintain Print Item as 1.
    Now the settings are ready for Printing Material doc
    8. While doing MIGO, ensure that in General Tab, you get "3 Collective Slip" beside the Print Indicator and you tick mark the field.
    9. Now depending on the setting in 5a, the Matl doc is printed. If it is 3, you have to print it using MB90. If it is 4, it is printed immediately.

  • Printing indicator in mat. doc

    Dear all,
    When viewing a material document in MB03, it is found that the print indicator is selected, but none of the printing options: Individual Slip/Indiv.Slip w.Inspect.Text/Collective Slip is selected.
    I just wonder how user could do so, as it is supposed that he has either select or not select the printing option in MIGO.
    Is this a system bug?
    Thanks in advance!

    It is not a bug. some iuser would have ticked the print functionality while doing MIGO.
    Thanks & regards,
    Kiran

  • Standard ALV Report default  print parameters

    Hi,
    We recently upgraded to ECC6. In some of the ALV reports for example F.35  (Credit Master Sheet) default print parameter has wider column specifications (X_65_255) as against earlier version (X_65_132). It might be due to flexibility in increasing additional columns but for our purpose X_65_132 was sufficient.  
    Now when we print with the standard settings the fonts are small. Individual users can change that default settings but due to large user base we want to default it at a global level but only for transaction F.35.
    Also we want to turn off ALV Statistics at this global level. We dont want to add a task for end users.
    Can this be achieved just for a specific report ? If not then for all reports? Please advise.
    Thanks,
    Vikram

    The no shading as well as many "extended print parameter" are no part of the OLD structures used by the OLD reuse FM, they are stored in memory (MEMORY ID 'EXTPAR')
    Check if 1703403 - Missing interface for extended print parameter can be applied in your system ?
    Nevertheless, could you try a single call like
    call function 'GET_PRINT_PARAMETERS'
       exporting
         mode                   = 'CURRENT'
         suppress_shading       = 'X'
         no_dialog              = 'X'
         report                 = sy-repid
       importing
         out_parameters         = w_params
       exceptions
         archive_info_not_found = 1
         invalid_print_params   = 2
         invalid_archive_params = 3
         others                 = 4.
    Regards,
    Raymond

  • Service tax value required updating while posting GR in MIGO transaction

    Dear Friends,
    We have a following scenario where service tax value required updating while posting Goods Receipt MIGO transaction.
    1. Purchase Order created for first line item where Qty. 1 and Net Rate Rs.1000/- so total Gross value will be Rs.1000/- example Vendor XYZ
    2. Freight condition type maintained for the first line item for Rs.500/- and assigned to Transportation vendor ABC.
    3. When Goods Receipt Posted for the Material against PO first line item, the material value updates Rs.1500/- (Material value as 
        per PO + Freight Charges)
    4.  After posting GR while making Invoice verification through MIRO transaction against the PO GR/IR clearance will be done for 
        Material vendor XYZ. For transportation Vendor ABC Planned delivery cost indicator will be select and since service tax is
        applicable Service tax code will also select.
    Here the values of Service tax if the Material available in Stock it will be inventories. If stock consumed before making the Invoice verification for Transportation vendor ABC, then the Service tax values update to PRD account.
    We know that in PO, tax code can be select for first line item (Raw Material) Vendor XYZ and if transportation charge condition type maintained for same first line item and assigned to Vendor ABC and there is no provision to maintain Service tax. So the service tax will get inventories while posting Invoice Verification for the transportation vendor.
    We want the values of Service tax to update while posting Goods Receipt in MIGO transaction.
    Thanks & regards
    Dhanu

    hi,
    Please note at the time of MIGO Servecie tax value does not appear, it will appear at the tiem of Invoice only.
    Regards,
    Rama Mohan Bangaru

  • Network shared printers stop working; default printer changes

    Hello,
    Have an odd printing issue that seems to be ongoing and am trying to come up with a good solution or fix for it.
    We have an environment that has a Windows 2012R2 Print Server, that is sharing various printers which are also set to List in Directory.  Some of the printers are HP and are using the HP Universal driver which shows as "True" for Packaged in
    the print management window, and some of the printers are Canon which are using device specific drivers and show as "False" for Packaged.  My understanding is that the packaged attribute simply indicates that Point and Print can then download
    the driver and install/use it without any security prompts whereas if it is not Packaged, then the driver must be installed on the local server/workstation by an Administrator.  We have Group Policy defined such that all Point and Print restrictions are
    Disabled.
    We then have multiple Remote Desktop Session Hosts based on Server 2008R2 (x64).  Users connect to these hosts via thin clients (Wyse) and there is a domain login script using KiXtart that creates printer connections to the shared printers using an address
    of \\printserver\printername.  We also set the default printer via the login script each time depending on user's group membership.
    Each part of this setup is on it's own routed VLAN subnet, so the Print Server is on 192.168.0.x/24, RDSHs are on 192.168.1.x/24 and the printers themselves are on 192.168.2.x/24.  There is no firewall or other restrictions between the subnets, all traffic
    is allowed to flow.
    The issue we are having is two parts, the first is the larger issue, but both are a pain:
    1) Randomly (no discernible pattern/reason/timeframe), some Canon printers will stop appearing in Print dialog boxes from applications when a user tries to print.  It only seems to happen on the Canon printers.  The printer will still show in Control
    Panel -> Devices and Printers, but when you right click it and try to go to Printer Properties or view any of the printer settings, you'll get an error saying the printer is not accessible/valid.  I have also tried a WMI query for "select * from
    win32_printer" and the printer will not be returned.  To temporarily fix it, we right click the printer, and choose to remove it and then go through the wizard to re-add the same printer from the directory again.  That will correct it and the
    user can print again, view all properties, etc.  This doesn't happen to every user but happens sporadically and once it happens to a user it seems to pop up once every week or two.
    Now, we have made a change and installed the Canon printers in question locally on the Remote Desktop Session Hosts themselves using TCP/IP ports so that each user logging into the session host will see all of the printers.  This also seems to have resolved
    this issue.  So it leads me to think there is some sort of timeout or connection getting dropped, but for no real apparent reason.  This is all on a virtualized platform and so the Print Server and Session Hosts have very reliable LAN connections
    amongst themselves.  And further, we never see the issue with the HP printers, they seem to maintain their stability at all times.
    2) The other issue we are seeing is that from time to time the default printer setting changes or vanishes altogether.  It doesn't happen to every user but once it does happen it happens regularly (multiple times a day).  This happens even when using
    the locally mapped TCP/IP printer or when using the network print server.  From what I have read and found, this generally seems to be a known issue regarding redirected client printers and some GP settings related thereto.  But we aren't redirecting
    any local client printers, everything is network based/shared.
    In digging into these two issues I have run across the following error we get regularly in the PrintService Event Viewer log:
    The print spooler failed to import the printer driver that was downloaded from \\printserver\print$\x64\PCC\ntprint.inf_amd64_59246c3ac1bd3f2a.cab into the driver store for driver Microsoft enhanced Point and Print compatibility driver. Error code= 800f024b.
    This can occur if there is a problem with the driver or the digital signature of the driver.
    And digging further into that seems to be that their was an error validating one of the DLL files as seen at the following thread:  http://social.technet.microsoft.com/Forums/windowsserver/en-US/9fe186e4-52f7-4552-a223-b2320cfc9ed5/driver-install-semi-fails-with-800f024b?forum=winserverprint
    We get the exact same error that is shown there UNISRV.DLL being flagged as invalid, and have applied the hotfix indicated in KB2701894.
    I am not sure the above error is realted to the issues at hand, but figured it is a good starting point to eliminate it as a potential cause of the issue.
    Any input or suggestions on what to do to diagnose or further resolve this would be greatly appreciated!

    Alan, I'm getting this error 600 in my company. Is there any fix for this problem?
    After installing KB2919355 on Windows 2012 R2, when I try to map a shared printer I receive the following error message: A policy is in effect on your computer which prevents you from connecting to this print queue. Please contact your system administrator.
    If I uninstall the patch the shared printer maps correctly.
    I also notice that if I copy the driver \\server\print$\x64\PCC\ntprint.inf_amd64_a7ac65d1b7714fb1.cab
    from a Windows 2012 R2 before applying KB2919355 to the server that has the patch applyed (and rename it), I can map the printer.
    Does anyone know if there is a fix for that?

  • Restrict the user   based on document type on migo transaction-prepare GRN

    Hi,
    We are running ECC6.0 R/3 system.We had a requirement as follows
    In MIGO transaction , we want to restrict the user on document type i.e. we want that a particular user can  prepare GRN for document type  STO only. He cannot prepare GRN for other document type.
    We checked  SU24->maintain check indicators for transaction codes->enter migo->execute->check indicator.This returned us the authorisation objects present in Migo transaction.We checked the help of all these objects,but none of them we found suitable for above mentioned requirement.We were planning to find out the proper authorisation object to add to Profile generater.
    The following is the objects which we have checked for.
    A_B_ANLKL-->     Asset Postings: Company Code/Asset Class
    A_B_BWART-->     Asset Postings: Asset Class/Transaction Type
    B_USERSTAT-->     Status Management: Set/Delete User Status
    B_USERST_T-->     Status Management: Set/Delete User Status using Process
    C_AFKO_AWK-->     CIM: Plant for order type of order
    C_CACL_DSG-->     Interface Design
    C_DRAW_BGR-->     Authorization for authorization groups
    C_DRAW_DOK-->     Authorization for document access
    C_DRAW_TCD-->     Authorization for document activities
    C_DRAW_TCS-->     Status-Dependent Authorizations for Documents
    C_KLAH_BKP-->     Authorization for Class Maintenance
    C_STUE_BER-->     CS BOM Authorizations
    C_STUE_WRK-->     CS BOM Plant (Plant Assignments)
    C_TCLA_BKA-->     Authorization for Class Types
    C_TCLS_BER-->     Authorization for Org. Areas in Classification System
    C_TCLS_MNT-->     Authorization for Characteristics of Org. Area
    F_BKPF_BUK-->     Accounting Document: Authorization for Company Codes
    F_BKPF_BUP-->     Accounting Document: Authorization for Posting Periods
    F_BKPF_KOA-->     Accounting Document: Authorization for Account Types
    F_FICA_FOG-->     Funds Management: authorization group of fund
    F_FICA_FSG-->     Funds Management: authorization group for the funds center
    F_FICB_FKR-->     Cash Budget Management/Funds Management FM Area
    F_KNA1_APP-->     Customer: Application Authorization
    F_LFA1_APP-->     Vendor: Application Authorization
    F_SKA1_BUK-->     G/L Account: Authorization for Company Codes
    G_GLTP  -->       Spec. Purpose Ledger Database (Ledger, Record Type, 
                                   Version)
    J_1IDEP_SL-->     Authorization object for depot sale transaction
    J_1IEXC_OT-->     Authorization object for Other Excise Invoice Create
    J_1IEX_PST-->     Autorization object for posting Other Excise invoice
    J_1IGRPT1-->     Auth. for PART1 at GR
    J_1IINEX  -->            Incoming Excise Invoice
    J_1IRG23D-->     Authorisation object for Depo Transactions
    K_CCA-->                     CO-CCA:  Gen. Authorization Object for Cost Center 
                                    Accounting
    K_CSKS     -->                CO-CCA:  Cost Center Master
    K_CSKS_SET-->     CO-CCA: Cost Center Groups
    K_PCA-->                    EC-PCA: Responsibility Area, Profit Center
    L_TCODE-->                    Transaction Codes in the Warehouse Management System
    M_ANFR_BSA-->     Document Type in RFQ
    M_ANFR_EKG-->     Purchasing Group in RFQ
    M_ANFR_EKO-->     Purchasing Organization in RFQ
    M_ANFR_WRK-->     Plant in RFQ
    M_BEST_BSA-->     Document Type in Purchase Order
    M_BEST_EKG-->     Purchasing Group in Purchase Order
    M_BEST_EKO-->     Purchasing Organization in Purchase Order
    M_BEST_WRK-->     Plant in Purchase Order
    M_MATE_CHG-->     Material Master: Batches/Trading Units
    M_MATE_STA-->     Material Master: Maintenance Statuses
    M_MATE_WRK-->     Material Master: Plants
    M_MRES_BWA-->     Reservations: Movement Type
    M_MRES_WWA-->     Reservations: Plant
    M_MSEG_BMB     -->Material Documents: Movement Type
    M_MSEG_BWA-->     Goods Movements: Movement Type
    M_MSEG_BWE-->     Goods Receipt for Purchase Order: Movement Type
    M_MSEG_BWF-->     Goods Receipt for Production Order: Movement Type
    M_MSEG_LGO-->     Goods Movements: Storage Location
    M_MSEG_WMB-->     Material Documents: Plant
    M_MSEG_WWA-->     Goods Movements: Plant
    M_MSEG_WWE-->     Goods Receipt for Purchase Order: Plant
    M_MSEG_WWF-->     Goods Receipt for Production Order: Plant
    M_RAHM_BSA-->     Document Type in Outline Agreement
    M_RAHM_EKG-->     Purchasing Group in Outline Agreement
    M_RAHM_EKO-->     Purchasing Organization in Outline Agreement
    M_RAHM_WRK-->     Plant in Outline Agreement
    Q_TCODE     QM -->         Transaction Authorization
    S_ADMI_FCD-->     System Authorizations
    S_ALV_LAYO-->     ALV Standard Layout
    S_BDS_DS-->     BC-SRV-KPR-BDS: Authorizations for Document Set
    S_BTCH_ADM-->     Background Processing: Background Administrator
    S_BTCH_JOB-->     Background Processing: Operations on Background Jobs
    S_CTS_ADMI-->     Administration Functions in Change and Transport System
    S_DATASET-->     Authorization for file access
    S_DEVELOP-->     ABAP Workbench
    S_DOKU_AUT-->     SE61 Documentation Maintenance Authorization
    S_GUI-->                     Authorization for GUI activities
    S_OC_DOC-->     SAPoffice: Authorization for an Activity with Documents
    S_OC_ROLE-->     SAPoffice: Office User Attribute
    S_OC_SEND-->     Authorization Object for Sending
    S_PACKSTRU-->     Internal SAP Use: Package Structure
    S_PRO_AUTH-->     IMG: New authorizations for projects
    S_RFC-->                     Authorization Check for RFC Access
    S_SCD0     -->                Change documents
    S_SPO_DEV-->     Spool: Device authorizations
    S_TABU_DIS-->     Table Maintenance (via standard tools such as SM30)
    S_TCODE     -->                Transaction Code Check at Transaction Start
    S_TRANSLAT-->     Translation environment authorization object
    S_TRANSPRT-->     Transport Organizer
    S_WFAR_OBJ-->     ArchiveLink: Authorizations for access to documents
    V_LIKP_VST-->Delivery: Authorization for Shipping Points
    V_VBAK_AAT-->Sales Document: Authorization for Sales Document Types
    V_VBAK_VKO-->Sales Document: Authorization for Sales Areas

    Have you executed a trace while a functional user executes the transaction code for the specific parameters? (i.e. document type). The trace will then show which objects are being checked; then look at the object documentation in txn Su21 to determine if there are any ways to restrict on the particular value; in some cases, if the authorization group field is being checked, additional configuration is needed in order to implement the security (Su21 will explain in detail for the particular object).

  • Bapi for migo transaction

    i have created a bapi to upload data for MIGO transaction.. (GOODS RECEIPT-->PURCHASE ORDER)
    i am getting the error " stock posting is not possible for this material "'.
    when i create directly, it is posted.. while uploading through the program it shows the above error.
    please suggest if anyone knows....
    Thanks in advance,
    Dhivya N.

    *& Report  ZR_MIGO_UPLOAD
    *& package name : zabap
    *& transport request number : MIDK901443
    *& program to upload goods movement
    REPORT ZR_MIGO_UPLOAD.
    ***DATA DECLARATION***
    type-POOLs:  icon.
    TYPES: BEGIN OF TY_GR_PO,
            EBELN(10) TYPE c ,     "'PO NUMBEr
            EBELP(10) TYPE c,     "PO ITEM NUMBER
    *       LGOBE TYPE LGOBE,     "STORAGE LOCATION DESCRIPTION
            LGORT(10) TYPE c,     "STORAGE LOCATION
            XFELD TYPE c,     "ITEM OK
            GERNR(10) TYPE c,     "SERIALNUMBER
            END OF TY_GR_PO.
    DATA: TA_GR_PO TYPE TABLE OF TY_GR_PO,    "TABLE FOR GOODS RECEIPT PURCHASE ORDER
           WA_GR_PO TYPE TY_GR_PO.
    DATA: BLDAT TYPE BLDAT,     "DOCUMENT DATE
            BUDAT TYPE BUDAT,     "POSTING DATE
            WEVER TYPE WEVER.     "VERSION FOR PRINTING GR SLIP
    ***BAPI DECLARATION***
    DATA: BEGIN OF GM_HEAD OCCURS 0.                    "Material Document Header Data
             INCLUDE STRUCTURE BAPI2017_GM_HEAD_01.
    DATA: END OF GM_HEAD.
    DATA: BEGIN OF GM_CODE OCCURS 0.
             INCLUDE STRUCTURE BAPI2017_GM_CODE.          "Assign Code to Transaction for Goods Movement
    DATA: END OF GM_CODE.
    DATA: BEGIN OF GM_RET OCCURS 0.
             INCLUDE STRUCTURE BAPI2017_GM_HEAD_RET.       "Material Document Number/Material Document Year
    DATA: END OF GM_RET.
    DATA: BEGIN OF GM_ITEM OCCURS 0.
             INCLUDE STRUCTURE BAPI2017_GM_ITEM_CREATE.    "Material Document Items
    DATA: END OF GM_ITEM.
    DATA: BEGIN OF GM_SER OCCURS 0.
             INCLUDE STRUCTURE BAPI2017_GM_SERIALNUMBER.    "Serial Number
    DATA: END OF GM_SER.
    data: BEGIN OF ta_bapireturn OCCURS 0.
            INCLUDE STRUCTURE BAPIRET2.
    data: END OF ta_bapireturn.
    ***declaration of excel file handling table***
    FIELD-SYMBOLS: <fs> type any.    "field symbol for alsm_excel
    DATA: TA_EXCEL TYPE TABLE OF ALSMEX_TABLINE,  "table to contain excel sheet values
           WA_EXCEL TYPE ALSMEX_TABLINE.
    ***declaration of other parameters***
    data:       V_brow type i VALUE    2,    "BEGIN OF ROW
                 V_bcol type i value   1,     "BEGIN OF COL
                 V_erow type i value 65536,   "END OF ROW
                 V_ecol type i value 256.     "END OF COLUMN
    DATA:  V_sear type string,
            V_INDEX TYPE i,
            V_tabix type sy-tabix,     "current line.
            v_lines type i.          "total number of records
    DATA: DATE TYPE DATS.
    ***SELECTION SCREEN***
    ***SELECTION SCREEN DESIGN***
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP 3.
    PARAMETERS: zCODE(2) TYPE C MATCHCODE OBJECT H_T158G,
                 zrefdoc type REFDOC,
                 version type WEVER.
    SELECTION-SCREEN skip 5.
    PARAMETERS: p_file type ibipparms-path.
    SELECTION-SCREEN SKIP 3.
    SELECTION-SCREEN END OF BLOCK b1.
    ***SELECTION SCREEN VALUE REQUEST***
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
       CALL FUNCTION 'F4_FILENAME'                                    "f4 help for file name
         EXPORTING
           PROGRAM_NAME  = SYST-CPROG
           DYNPRO_NUMBER = SYST-DYNNR
           FIELD_NAME    = 'P_FILE'
         IMPORTING
           FILE_NAME     = P_FILE.
    ***SELECTION SCREEN EVENT***
    AT SELECTION-SCREEN.                                 "validation
       if p_file <> ''.
         V_sear = p_file.
         SEARCH V_sear for '.xls'.
         if sy-subrc <> 0.
           message 'please provide excel file. it is not valid' type 'E'.
         ENDIF.
       ENDIF.
    INITIALIZATION.
    *   DATE = '17.04.14'.
       GM_HEAD-PSTNG_DATE = SY-DATUM.
       GM_HEAD-DOC_DATE   = SY-DATUM.
       gm_head-pr_uname = sy-uname.
    ***START OF SELECTION***
    START-OF-SELECTION.
       gm_head-REF_DOC_NO = zrefdoc.
       gm_head-VER_GR_GI_SLIP = version.
       GM_CODE-GM_CODE = zCODE.
       PERFORM EXCEL_UPLOAD.
       PERFORM EXCEL_CONVERSION.
       PERFORM NO_RECORDS.
    END-OF-SELECTION.
       PERFORM BAPI_ASSIGNMENT.
       PERFORM BAPI_FM.
    *&      Form  EXCEL_UPLOAD
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM EXCEL_UPLOAD .
       CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
         EXPORTING
           FILENAME                = P_FILE
           I_BEGIN_COL             = V_BCOL
           I_BEGIN_ROW             = V_BROW
           I_END_COL               = V_ECOL
           I_END_ROW               = V_EROW
         TABLES
           INTERN                  = TA_EXCEL
         EXCEPTIONS
           INCONSISTENT_PARAMETERS = 1
           UPLOAD_OLE              = 2
           OTHERS                  = 3.
    ENDFORM.                    " EXCEL_UPLOAD
    *&      Form  EXCEL_CONVERSION
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM EXCEL_CONVERSION .
       if ta_excel is NOT INITIAL.
         sort ta_excel by row col.
         clear wa_excel.
         clear wa_GR_PO.
         LOOP AT ta_excel INTO wa_excel.
           move wa_excel-col to v_index.
           ASSIGN COMPONENT v_index OF STRUCTURE wa_GR_PO to <fs>.
           if sy-subrc = 0.
             move wa_excel-value to <fs>.
           ENDIF.
           at END OF row.
             append wa_GR_PO to ta_GR_PO.
             clear wa_GR_PO.
           ENDAT.
         ENDLOOP.
       else.
         MESSAGE 'no data for conversion' type 'I'.
       ENDIF.
    ENDFORM.                    " EXCEL_CONVERSION
    *&      Form  NO_RECORDS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM NO_RECORDS .
       DESCRIBE TABLE ta_GR_PO LINES v_lines.
       if v_lines = 0.
         MESSAGE 'NO RECORDS TO UPLOAD' TYPE 'E'.
       ENDIF.
    ENDFORM.                    " NO_RECORDS
    *&      Form  BAPI_ASSIGNMENT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM BAPI_ASSIGNMENT .
       IF TA_GR_PO IS NOT INITIAL.
         LOOP AT TA_GR_PO INTO WA_GR_PO.
           gm_item-PO_NUMBER = wa_gr_po-ebeln.
           GM_ITEM-STGE_LOC = WA_GR_PO-LGORT.
           GM_ITEM-PO_ITEM = WA_GR_PO-EBELP.
           GM_ITEM-NO_MORE_GR = 'X'."WA_GR_PO-XFELD'.
    *      GM_SER-SERIALNO = WA_GR_PO-GERNR.
           gm_item-NO_MORE_GR =  1.
           gm_item-ENTRY_QNT = 2.
           gm_item-MOVE_TYPE = 101.
    *      gm_item-MVT_IND = 'B'.
           gm_item-plant = 'P001'.
           gm_item-move_stloc = 'FG01'.
    *      GM_ITEM-SPEC_STOCK = 'K'.
           APPEND GM_ITEM.
           APPEND GM_SER.
         ENDLOOP.
        ELSE.
          MESSAGE 'DATA IS NOT UPLOADED' TYPE 'I'.
        ENDIF.
    ENDFORM.                    " BAPI_ASSIGNMENT
    *&      Form  BAPI_FM
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM BAPI_FM .
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
       EXPORTING
         GOODSMVT_HEADER               = gm_head
         GOODSMVT_CODE                 = gm_code
    *   TESTRUN                       = ' '
    *   GOODSMVT_REF_EWM              =
      IMPORTING
        GOODSMVT_HEADRET              = gm_ret
    *   MATERIALDOCUMENT              =
    *   MATDOCUMENTYEAR               =
       TABLES
         GOODSMVT_ITEM                 = gm_item
        GOODSMVT_SERIALNUMBER         =  gm_ser
         RETURN                        = ta_bapireturn
    *   GOODSMVT_SERV_PART_DATA       =
    *   EXTENSIONIN                   =
    if ta_bapireturn-type = 'S'.
         write:/ icon_green_light as icon,
                 'success: Material document',gm_ret-mat_doc,  'is created for the GOODS RECEIPT- po number : ', wa_gr_po-ebeln,
               / 'reason:' , ta_bapireturn-message.
    ELSEIF ta_bapireturn-type = 'E'.
         write:/ icon_red_light as icon,
                 'error: Material document',gm_ret-mat_doc , 'is not created for the GOOD RECEIPT- po number : ', wa_gr_po-ebeln,
               / 'reason:' , ta_bapireturn-message.
    ENDIF.
    ENDFORM.                    " BAPI_FM

  • Changing default printer in Purchase order

    Hi
    This is Mohammed. Khan, when we are working with these purchase Order T-codes (IW32, IW21, IW28, IW38) When ever we are trying to give purchase order print, than automatically it will take $MECH,at present this printer is not available in our landscape, if there I donu2019t know where this printer is defined exactly, I am searching this particular printer in Output devices(SPAD) but this is not available in that list, can any body tell me how to change the default printer, from purchase order printing list, and also let me know how to set different printer in the place of $MECH printer..
    Thank you,
    Regards,
    Mohammed. Khan

    Hi
    Try checking NACE transaction, for your output type the default printer assigned (in communication method). And also check defaults tab in user record in SU01 tcode.
    Thanks

Maybe you are looking for