Sqlldr when cluase issue in unix

hi.. this is my ctl file
INTO TABLE "APB_DBA"."BN_STG"
APPEND
WHEN(03:07) <> 'TRAIL'
FIELDS TERMINATED BY '~'
OPTIONALLY ENCLOSED BY '"' AND '"'
TRAILING NULLCOLS
(Column1skip filler,
COMPANY_CODE,
CUST_BL_FRMT_NO)
This is working fine and data loaded via toad.
The same ctl file when I try to run from unix by removing optionally enclosed by option and its giving below error
with out OPTIONALLY ENCLOSED
OPTIONS (SKIP=1,DIRECT=TRUE)
LOAD DATA
INSERT INTO TABLE APB_DBA.BN_STG
FIELDS TERMINATED BY '~'
TRAILING NULLCOLS
WHEN (03:07) <> 'TRAIL'(
Column1skip filler,
COMPANY_CODE,
CUST_BL_FRMT_NO)
Error
SQL*Loader-350: Syntax error at line 6.
Expecting "(", found keyword when.
WHEN (03:07) <> 'TRAIL'(
^
with  OPTIONALLY ENCLOSED and when clause
SQL*Loader-350: Syntax error at line 7.
Expecting "(", found keyword optionally.
OPTIONALLY ENCLOSED BY '"' AND '"'(
^
Need some help.

You put the WHEN clause in the wrong place.  It needs to be as below:
OPTIONS (SKIP=1,DIRECT=TRUE)
LOAD DATA
INSERT INTO TABLE BN_STG
WHEN(03:07) <> 'TRAIL'
FIELDS TERMINATED BY '~'
TRAILING NULLCOLS
(Column1skip filler,
COMPANY_CODE,
CUST_BL_FRMT_NO)

Similar Messages

  • COST GL account when goods issue - enhancement or user exist

    Hello SAP exports,
    There is a requirement from F&A department for different COGS GL account based on Customer Account Assignment Group value when goods issues (GI) (goods movement).  Customer Account Assignment Group field name is KNVV-KTGRD.   The solution is NOT possible for standard SAP SD (pricing procedure) / MM (T-Code:OBYC with GBB).    Therefore, I am searching solution for enhancement.
    the requirement is like following:
    KNVV-KTGRD                                   COGS GL account at goods issue
    01                    Domestic                   818100
    02                    Export                       818200
    03                    Testing - sample         818300
    04                    Testing - VOM            818400
    05                    Franchise                   818500
    Can you please let me know what and how this can be resolve by enhancement or user exist?
    Thank you.
    Kind Regards,
    Sylvia Chen

    Hello,
    The requirement is to provide different COGS GL account based on the Customer Account Assignment Group value(KNVV-KTGRD) when SAP performs goods issue.  for example, movement type 601,
    This means, when company ships goods to differnt customers, then SAP should generate different COGS GL account.
    for example, when company ships goods to customer account assignment group '01' (Domestic customers), then SAP should generate COGS GL account 818100.
    when company ships goods to customer account assignment group '02' (export customes), then SAP should generate COGS GL account 818200. 
    when company ships goods to customer account assignment group '03' (Testing - sample customers), then SAP should generate COGS GL account 818300. 
    the logic is following:
    KNVV-KTGRD              COGS GL account at goods issue
    01 Domestic                 818100
    02 Export                     818200
    03 Testing - sample      818300
    04 Testing - VOM         818400
    05 Franchise                818500
    I am not good at user exist.  
    Can you please provide solution with step-by-step guide?
    Thank you.
    Regards,
    Sylvia Chen

  • Error ORA-00980: synonym translation is no longer valid when i issue

    i accidentally drop one of my table. To bring it back i used Imp tool. But it gives an error ORA-00980: synonym translation is no longer valid when i issue
    Select * from ship_sched_fact_notice_det
    Action taken using Imp
    Username: erpdada
    Password:
    Connected to: Oracle Database 10g Release 10.1.0.2.0 - Production
    Import file: EXPDAT.DMP > e:\erpdada_august13.dmp
    Enter insert buffer size (minimum is 8192) 30720> 30720
    Export file created by EXPORT:V10.01.00 via conventional path
    Warning: the objects were exported by SYSTEM, not by you
    import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    import server uses AL32UTF8 character set (possible charset conversion)
    List contents of import file only (yes/no): no > y
    Import entire export file (yes/no): no > n
    Username: erpdada
    Enter table(T) or partition(T:P) names. Null list means all tables for user
    Enter table(T) or partition(T:P) name or . if done: ship_sched_fact_notice_det
    Enter table(T) or partition(T:P) name or . if done: .
    "CREATE PUBLIC SYNONYM "XMLTYPE" FOR "SYS"."XMLTYPE""
    "CREATE TABLE "SHIP_SCHED_FACT_NOTICE_DET" ("SSFND_ITEM_NOT_DET_ID" NUMBER, "
    ""SSFN_FACTORY_ID" VARCHAR2(40) NOT NULL ENABLE, "SSFN_FAC_NOTICE_ID" NUMBER"
    " NOT NULL ENABLE, "SSD_SHIP_ITEM_ID" NUMBER NOT NULL ENABLE, "OI_ITEM_ID" N"
    "UMBER NOT NULL ENABLE, "ORDER_TYPE" VARCHAR2(1), "SSFND_ITEM_CODE" VARCHAR2"
    "(300), "SSFND_QTY" NUMBER, "SSFND_CTN" NUMBER, "SSFND_TOT_CBM" NUMBER, "SSF"
    "ND_REM1" VARCHAR2(256), "SSFND_REM2" VARCHAR2(256), "SSFND_UNIT_ID" VARCHAR"
    "2(40), "SSFND_IS_EXCL_SUMMARY" VARCHAR2(1))  PCTFREE 10 PCTUSED 40 INITRANS"
    " 1 MAXTRANS 255 STORAGE(INITIAL 81920 FREELISTS 1 FREELIST GROUPS 1 BUFFER_"
    "POOL DEFAULT) TABLESPACE "ORDER_DATA01" LOGGING NOCOMPRESS"
    . . skipping table "SHIP_SCHED_FACT_NOTICE_DET"
    "GRANT DELETE ON "SHIP_SCHED_FACT_NOTICE_DET" TO "SHIPMENT_NOTICE""
    "GRANT INSERT ON "SHIP_SCHED_FACT_NOTICE_DET" TO "SHIPMENT_NOTICE""
    "GRANT SELECT ON "SHIP_SCHED_FACT_NOTICE_DET" TO "SHIPMENT_NOTICE""
    "GRANT UPDATE ON "SHIP_SCHED_FACT_NOTICE_DET" TO "SHIPMENT_NOTICE""
    "CREATE UNIQUE INDEX "PK_SHIP_SCHED_FACT_NOTICE_DET" ON "SHIP_SCHED_FACT_NOT"
    "ICE_DET" ("SSFND_ITEM_NOT_DET_ID" )  PCTFREE 10 INITRANS 2 MAXTRANS 255 STO"
    "RAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLE"
    "SPACE "ORDER_DATA01" LOGGING"
    "ALTER TABLE "SHIP_SCHED_FACT_NOTICE_DET" ADD  CONSTRAINT "PK_SHIP_SCHED_FAC"
    "T_NOTICE_DET" PRIMARY KEY ("SSFND_ITEM_NOT_DET_ID") USING INDEX PCTFREE 10 "
    "INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1"
    " BUFFER_POOL DEFAULT) TABLESPACE "ORDER_DATA01" LOGGING ENABLE "
    "ALTER TABLE "SHIP_SCHED_FACT_NOTICE_DET" ADD CONSTRAINT "SHIP_SCHED_FACT_NO"
    "TICE_DE_FK1" FOREIGN KEY ("SSD_SHIP_ITEM_ID") REFERENCES "SHIPPING_SCHEDULE"
    "_DETAILS" ("SSD_SHIP_ITEM_ID") ENABLE NOVALIDATE"
    "ALTER TABLE "SHIP_SCHED_FACT_NOTICE_DET" ADD CONSTRAINT "SHIP_SCHED_FACT_NO"
    "TICE_DE_FK2" FOREIGN KEY ("SSFN_FAC_NOTICE_ID") REFERENCES "SHIP_SCHED_FACT"
    "ORY_NOTICE" ("SSFN_FAC_NOTICE_ID") ENABLE NOVALIDATE"
    "ALTER TABLE "SHIP_SCHED_FACT_NOTICE_DET" ENABLE CONSTRAINT "SHIP_SCHED_FACT"
    "_NOTICE_DE_FK1""
    "ALTER TABLE "SHIP_SCHED_FACT_NOTICE_DET" ENABLE CONSTRAINT "SHIP_SCHED_FACT"
    "_NOTICE_DE_FK2""
    Import terminated successfully with warnings.
    I drop the old synonym and re-create it but still it gives the same error...

    Since you are on 10g did you try flashback table feature - http://tonguc.wordpress.com/2007/01/01/oracle-10g-flashback-versions-query-drop-table-and-recyclebin-management/
    FLASHBACK TABLE <tabname> TO BEFORE DROP;
    If you didnt use purge option, the dropped object is on your recyclebin - http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9018.htm#sthref9593
    Best regards.

  • I want to know when we issue truncate table statement in oracle .

    i want to know when we issue truncate table statement in oracle .No log will be write in redo log .But we can recover data using flashback or scn.I want to know where is the actually truncate table statement log is stored in oracle database.Please explain me in detail step by step .

    Hi,
    I have truncated table after that i have restored that data.See below the example.I want to know from where it's restored.
    From which log file it's restored.
    create table mytab (n number, x varchar2(90), d date);
    alter table mytab enable row movement;
    Table altered.
    SQL> insert into mytab values (1,'Monsters of Folk',sysdate);
    1 row created.
    SQL> insert into mytab values (2,'The Frames',sysdate-1/24);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select CURRENT_SCN from v$database;
    CURRENT_SCN
    972383
    SQL> select * from mytab;
    N
    X
    D
    1
    Monsters of Folk
    30-DEC-12
    2
    The Frames
    30-DEC-12
    N
    X
    D
    SQL> set lines 10000
    SQL> /
    N X D
    1 Monsters of Folk 30-DEC-12
    2 The Frames 30-DEC-12
    SQL> select to_char(sysdate,'yyyymmdd hh24:mi:ss') from dual;
    TO_CHAR(SYSDATE,'
    20121230 09:29:24
    SQL> set timing on
    SQL> truncate table mytab;
    Table truncated.
    Elapsed: 00:00:15.75
    SQL> select * from mytab as of timestamp TO_TIMESTAMP('20121230 09:29:24','yyyymmdd hh24:mi:ss');
    N X D
    1 Monsters of Folk 30-DEC-12
    2 The Frames 30-DEC-12
    Elapsed: 00:00:00.28
    SQL> insert into mytab select * from mytab as of timestamp TO_TIMESTAMP('20121230 09:29:24','yyyymmdd hh24:mi:ss');
    2 rows created.
    Elapsed: 00:00:00.01
    SQL>

  • Error when installing issue in Content Viewer

    Hi,
    I have a strange error in my Content Viewer.
    When downloading it stalls and a message says "Could not install issue, relaunch app and download your purchase again" (my translation from swedish).
    It sometimes stalls when downloading and sometimes when installing issue.
    Anyone got a solution or having the same problem?
    Br
    Henrik

    Henrik, this can be either or. The internal Acrobat.com servers seem to have download issues once a week or so.
    The best way I think you can determine this is if the download is failing at the same point during the download. If it is, it's a problem with the folio. If it's not, then it's a temporary problems with the servers.
    If it is a problem with the folio, there's no straightforward answer -- but if you were able to download that folio recently, delete or update the articles you've added since.
    If you have no idea what's causing it, you can either start deleting articles, or try updating them first.

  • ProviderIncompatibleException always pop up when i issue get request

    i always get this error when i issue this command
    http://localhost:19572/api/courses  this method is generating the exception
    public IQueryable GetAllCourses(){return _ctx.Courses.Include(“CourseSubject”).Include(“CourseTutor”).AsQueryable();}
    ‘System.Data.Entity.Core.ProviderIncompatibleException’ occurred in EntityFramework.dll but was not handled in user code
    Additional information: An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is
    correct.
    and when i inspect the JASON element in my fiddler i always get this
    ExceptionMessage=The system cannot find the file specified
    ExceptionType=System.ComponentModel.Win32Exception
    Message=An error has occurred.
    and i am using entity framework 6.0.1 i tried 5 but it didn't work i have problems with connection string i have SQL server on my machine 
    https://onedrive.live.com/redir?resid=ac25d7a2dc192bdb!13631&authkey=!AJIYDQ0vhYY1Uzk&ithint=folder%2c

    Sometimes a problem with Firefox may be a result of malware installed on your computer, that you may not be aware of.
    You can try these free programs to scan for malware, which work with your existing antivirus software:
    * [http://www.microsoft.com/security/scanner/default.aspx Microsoft Safety Scanner]
    * [http://www.malwarebytes.org/products/malwarebytes_free/ MalwareBytes' Anti-Malware]
    * [http://support.kaspersky.com/faq/?qid=208283363 TDSSKiller - AntiRootkit Utility]
    [http://windows.microsoft.com/MSE Microsoft Security Essentials] is a good permanent antivirus for Windows 7/Vista/XP if you don't already have one.
    Further information can be found in the [[Troubleshoot Firefox issues caused by malware]] article.
    Did this fix your problems? Please report back to us!

  • When I issue the 'Force group Settings' command what effect will this have on existing flows? Do I need to disable WCCP prior to issuing this command on the affected WAE's?

    Hi WAAS Experts,
    I have a query, when I issue the 'Force group Settings' command what effect will this have on existing flows? Do I need to disable WCCP prior to issuing this command on the affected WAE's?
    Thanks,
    Shankar K

    Hi Shankar,
    A change of classifier/policy on the WAE is not affecting the existing flows so you shouldn't need to disable WCCP if you want to force group settings there.
    Regards,
    Nicolas

  • CR4E 2.0 font issue on unix/aix

    I have designed my report on windows using courier new font and is working good. I also checked the font properties of the output pdf and is courier new(embedded subset). But when I deploy the same ear file on WAS6.1 on AIX it is using different font and the output pdf properties shows the font as LucidaSansTypewritterRegular(embedded subset) and some of the characters ()) are displayed as ? and also get "Cannot extract the embedded font AAAAA:LucidaSansTypewritterRegular, some characters may not display or print properly" error message when I open it in Adobe reader 9.1.
    How did it pick the LucidaSansTypewritterRegular font on unix if the template specifies Courier New?
    Can I copy the same font file from my windows machine to jre/fonts folder of WAS61 on AIX? Are there any compatibilty or licensing issues?
    Any help is appreciated. Thanks

    Try to copy windows fonts to WAS JVM fonts folder (something like: opt/IBM/WebSphere/AppServer/java/jre/lib/fonts).

  • Com.sun.security.auth.module.NTSystem compilation issues in Unix

    Hi ,
    I m using com.sun.security.auth.module.NTSystem in one my java application to get the current domain. The application and app server are running on windows OS.
    Now i want to switch my OS to Unix, where i m getting compilation issues with com.sun.security.auth.module.NTSystem ,
    1)Do i need to change the module from NTSystem to UnixSystem?
    2) I m developing the java application in Eclipse 3.2 with java 1.4 , when i m trying to import the below statment com.sun.security.auth.module.UnixSystem i couldn't? Could you please let me how i can import the UnixSystem or NTSystem will work?
    Appreciate your help!!!!
    Regards,
    Ravi.

    Unix, where i m getting compilation issues with com.sun.security.auth.module.NTSystemOf course.
    Do i need to change the module from NTSystem to UnixSystem?Of course.

  • Trailing space issue in Unix File

    Hi All,
    I am facing an issue with the trailing space in Unix file content.
    When the file is being created in Unix server the trailing space is getting trimmed automatically.
    As per the requirement,this space should be retained in the Unix file as it is when the file is being downloaded to PC.
    Is there any solution for this issue? Request your help for resolving this.
    Thanks in Advance,
    Savitha

    Hi,
    When you're writing youd data to the file (assume you're using the TRANSFER command), you could try explicitly specifying the length of the data line to write, ie.
    TRANSFER data(200) TO DATASET filename.
    Regards,   Andy

  • Sqlldr: run ctl file in unix

    Hi,
    I'm new to Unix.
    How can I execute a control file in unix.
    my control file is in /home/r226124/split/ctl folder
    when trying to execute the command
    sqlldr USERID=username/password@host CONTROL=Split.ctl LOG=Split.log
    this is the error i'm getting
    ksh: sqlldr: not found
    Any help?
    Thanks.

    sqlldr is in /opt/oracle/product/client/102/bin/sqlldr
    but when i run, i'm getting this error
    r226124@host:/opt/oracle/product/client/102/bin> ls -ltr sql*
    -rw-rw-r--  1 admgwldv securedv   2865 2008-08-18 15:06 sqlnet.log
    -rwxr-xr-x  1 oracle   dba       10166 2009-01-06 17:46 sqlj
    -rwxr-xr-x  1 oracle   dba           0 2009-01-06 17:53 sqlldrO
    -rwxr-xr-x  1 oracle   dba           0 2009-01-06 17:53 sqlplusO
    -rwxr-xr-x  1 oracle   dba      744359 2009-01-06 17:57 sqlldr
    -rwxr-xr-x  1 oracle   dba       12767 2009-01-06 18:01 sqlplus
    r226124@host:/opt/oracle/product/client/102/bin> sqlldr
    ksh: sqlldr: not found
    r226124@host:/opt/oracle/product/client/102/bin>

  • How to restrict the GR for Production Order when Goods Issue is not done

    Hi Gurus
    How to restrict the GR for Production Order when all the required components for production order are not issued with all required quantity. Even for partial issue system should not allow GR with 101. The user status with RMWA, RMWF & CGFB is not working.
    Pls suggest best solution.
    Abhijit.

    Hi,
    You can club together the GI nad GR at the time of confirmation..
    I.e Backflush for the components and auto GR for the Product.
    So that you can stream line the Process.
    The best Option would be to use the User Exit:
    Enhancement - MBCF0002
    Functional Module - EXIT_SAPMM07M_001
    Include - ZXMBCU02
    Refer below link for further details..
    How to stop the goods receipt before issueing the goods for production orde
    Regards,
    Siva

  • Item Cost FIFO was wrong when Goods Issue. How to slove it?

    Dear Experts,
    I met item cost of FIFO item was wrong when I did Goods Issue. The scenario is I did goods receipt from PO that item cost was 8.02 per unit. Then I saw in the inventory audit report that item cost was 8.02 per unit. That's right.
    But after that I did goods issue the item cost was 7.485 per unit. And I check to Journal Entry and Inventory audit report were posted the wrong item cost, 7.485 per unit. What source does the system bring to calculation item cost for goods issue?
    I access to SQL for check OINM and OITM table. Both of OINM and OITM's item cost were correct in the goods receipt transaction, but they booked wrong cost, 7.485 per unit, in goods issue transaction. I don't understand the logical that SAP B1 use to calculation item cost that use for goods issue.  In the past I think the table that related to item cost calculation was only OITM, OITW, OINM, but now I think I misunderstand it due to this case.
    Regards,
    Pornrat  Trisauvapak

    Dear Gardon,
    I use the FIFO for calculation and in this case has only one lot remain, that cost 8.02. Now I observe OINM table again all field are correct except OpenValue field. I'm not sure this field is related to item cost of goods issue, or not?
    Regards,
    Pornrat Trisauvapak

  • File adapter: End of line issue in unix receiver

    Hi all,
    We are sending flat files using File Adapter (FTP) with the File content conversion functionality and we can see the file right in our windows system, but when it arrives to the Unix receiver, they give us an error regarding the End of line.
    It has a ^M character in every line so it cannot be processed.
    Does anyone know how to skip this end of line character in our file keeping the same format?
    Thanks in advance.

    Hi Daniel,
    you can try to use this adapter module:
    localejbs/SAP XI Sample/ConvertCRLFfromToLF
    http://help.sap.com/saphelp_nw04/helpdata/en/32/43d84072378031e10000000a1550b0/content.htm
    Hope this help.
    Francesco

  • "skip when shuffling" issue

    I'm wondering about the new "skip when shuffling" option in iTunes 5... does this apply only to when shuffling songs in iTunes, or is it supposed to work when shuffling songs on my iPod? Because it's not.
    I've ticked this option for all of my classical songs, but they still turn up now and again when I'm shuffling songs on my iPod.
    Is this because
    a. This option only applies to shuffled songs playing in iTunes, and not on the iPod
    b. This option will only work on the iPod software currently running on the
    Nano, and will start to work when Apple release this version for all iPods.
    c. It's broke.
    My iPod is a 60Gb colour, running 1.2 software included in the June update. Anybody having similar problems, or know the answer?
    Thanks,
    - c -

    OK... so I did some testing - I apparently have waaaaay too much time on my hands - and it seems that checking the "skip when shuffling" option for a song in the iTunes library does not flag the song as needing to be updated on the iPod.
    I changed the genre for all of the songs I'd checked the "skip when shuffling" option for - so iTunes was forced into updating them on my iPod - and now these songs don't seem to appear when shuffling on the iPod.
    Am I alone in having this issue?
    - c -

Maybe you are looking for

  • SQL Exception: A lock could not be obtained within the time requested

    Hi Friends, In one of my processes there is an automatic activity which reads some records from an excel sheet and loads them in a separated array of objects and then for each object in the array it creates a copy using Split-N. There are about 2000

  • Order Import of Sales Tax

    I have an order with a number of order lines. For each of the order line there is a sales tax associated with it. The orders are created outside OM and needs to be imported into Order Import as order lines and sales tax lines. What is the proces to s

  • Mapping runtime perfermance issue.

    Hi all I have an interface that runtime process sometimes fast sometimes slow.In case of low process ,I figured out the mapping runtime took a lot of time.So i would like to know what factors can lead to the mapping runtime low performance? thanks in

  • Incoming mail not showing up in Mail

    I converted over to a Mac Mini running Montian Lion. I also have an older Power Book (the reason for my upgrade since it could nor un Mountain Lion or properly use iCloud) and a first generation iPad. I can receive but I cannot send and get the messa

  • Problem with certification

    Can you give me a sites about sap pdf ebbok certification thank you in advance