Maintain commodity code/CAS no. in batch job

Hi experts, is it a fast way to maintain lots of commodity code/CAS no. in batch job? U know, it costs time maintaining one entry by one entry in "define commodity codes/import commodity code no. by country" &  "define CAS numbers" (IMG). Pls advise. Thx.

Hi Prakash,
I'm authorised to use LSMW but fail to "read data". System pops up "File 'c:\abc.txt' does not exist or is currently locked. Message no. /SAPDMC/LSMW_OBJ_070019". Actually, the file named "abc.txt" is not being used when reading data (lsmw) & located in C drive.
Pls advise. Thx.

Similar Messages

  • Commodity Code in Invoice

    Hi All,
    I got a requirement from the business that, whenever the the business maintains Commodity code at invoice in item level, that commodity code should pick into the invoice output. Can anyone help me in this. What are exact Table-Fields that need to pass to table EIPO and get the Commodity Code number into invoice.
    Note:
    1) Here the invoice line item number is different with Commodity item number.
    2) If more than one invoice line item number is there means how to map to find the exact commodity number.
    Your are helpful to me in fixing the issue. Appreciate the inputs.
    Regards,
    Vinod Reddy

    Hi Siva,
    Yes, by passing Foreign Trade number into EIPO table i can get the Commodity code number. But in my case there are more than 1 line item for the invoice. For each line item  business is maintaining diff Commodity code numbers manually. Can you please let me know how can i get exact commodity number. In my case the invoice line item number VBRP is  different with Commodity code item number EIPO.
    Regards,
    Vinod

  • How to create a batch-job dynamically?

    Hello,
    I would like to create a batch-job from within my abap code.
    Therefore I want to determine a abap-report to be executed every X-Hours.
    Do you have some sample code for creating a batch job?
    I need to do it in abap because I want to create a TN to trigger the code creating the job.
    So the user interaction will be minimal to start a periodic batch job.
    thanks.

    Hi Daniel,
    select options could be stored by export/import to/from database:
          DESCRIBE TABLE t_vkpos LINES n.
          READ TABLE t_vkpos INDEX n.
          lastmaxvbeln = t_vkpos-vbeln.
          PERFORM get_varimemkey USING p_vari CHANGING vkposmemkey.
          EXPORT lastmaxvbeln TO DATABASE indx(zk) ID vkposmemkey.
          IF NOT sy-subrc IS INITIAL.
          PERFORM get_varimemkey USING p_vari CHANGING vkposmemkey.
          IMPORT lastmaxvbeln FROM DATABASE indx(zk) ID vkposmemkey.
          IF sy-subrc IS INITIAL.
            ls_vbeln-sign   = 'I'.
            ls_vbeln-option = 'GT'.
            ls_vbeln-low    = lastmaxvbeln.
            APPEND ls_vbeln.
          ENDIF
    FORM get_varimemkey USING    vari TYPE raldb_vari
                        CHANGING memkey TYPE char22.
      IF vari IS INITIAL.
        RAISE get_varimemkey_unexepected.
      ENDIF.
      CONCATENATE 'Z_VKPOS_' vari INTO memkey.
    ENDFORM.                    "
    regards
    Walter Habich

  • Enter commodity code/ Group code for the hierachy

    Hi Experts,
    I am trying to create New trading goods material by copying another similar material but here the issue is when I am trying to save the material mesage says Enter commidity code/ Group code for the hierarchy. This message is coming when every thing is finish and trying to save at the end of the transaction.
    I believe we need to maintain commodity codes in customizing for sales and distribution especially foreign trade.
    Any one can give me idea what is the configuration for this step by step.
    Appreciate your help
    Thanks
    Krishna

    Hello,
    Commodity code can be configured in SPRO->Sales and Distribution->Foreign Trade/Customs->Basis data for Foreign Trade->Define Commodity Codes / Import Code Numbers By Country.
    You maintain the same at country level.
    Thanks,
    Venu

  • Manually create HTS/Commodity Code:

    I have some information at the following link that indicates it is possible to manually enter commodity codes (as I only need a small number of codes and do not require an XML updoad).
    http://help.sap.com/saphelp_gts80/helpdata/en/eb/755b3fe4ee1e26e10000000a114084/frameset.htm
    When I attempt to follow the navigation path within the Implementation SPRO transaction, I do not see the specified path:      
    "1.      Choose SAP Customs Management ® Classification ® Tariff Code Numbers ® Maintain Tariff Code Numbers orCommodity Codes ® Maintain Commodity Codes."
    I already have set up the numbering schemes.  Is it possible to manually enter commodity codes in GTS 7.2?  If so why does this path not appear on my system,  I do not see "Classification".

    This is user-maintained data, so you would follow the path using the GTS user menu (/sapsll/menu_legal).

  • Error " In case of evaluated receipt settlement, please maintain tax code", during VI01

    Dear Team
    We have a scenario in our environment where for a delivery made for STO Purchase Order, we are trying to post shipping cost document for Shipping document.
    When we try to save the document, the system returns the error " In case of evaluated receipt settlement, please maintain tax code".
    We have checked in the system. The vendor to whom the PO has been raised is not maintained for Evaluated Receipt Settlement, and as this is a STO , no vendor info record has been maintained for the same.
    The issue has started to come for a new plant and transportation route, for other routes and plants we are still able to proceed successfully for creation of shipment costs
    Can this be an issue of master data maintanence that we may have missed during plant creation or transportation route creation
    Else, Kindly guide.

    Hi Tarunveer,
    Which Vendor are you mentioning: Plant Vendor of STO or Forwarding Agent.
    I am suggesting to check in LFM2 for Forwarding Agent.
    Same way, in the case of Invoice Tab in PO, (Which PO are you mentioning: STO or PO for Forwarding Agent?)
    Regards,
    MJ.

  • T code to find sales orders/Deliveries for which batch job could not create

    Hi
    Once a PGI has been created for a sales order, the invoice should be created in nightly batch. Once is a while, something is wrong and SAP cannot create the invoice. I know there is a transaction that will list the orders / deliveries where SAP could not create the invoice. Can you tell me what that t-code is? Thanks

    Lakshmipathy
    I think you did not get my point corectly , I know , billing docs due list , what I  need was after batch job running , for some deliveries , due to some reason , billing docs might not have created .
    Business needs to know only thsese delivery docs in a T code or table but not all the due document . I did not find answer for this question in SDN .
    I got the answer now  for this question , it is V.21 .
    Thanks for your time .

  • Modifying t-codes to export batch jobs to drive rather than print

    There are several t-codes that schedule batch jobs, but they only print.  Is it possible to revise a t-code to export batch jobs directly to a drive?
    What is the code for this?
    Thanks.

    What do you mean by "export batch jobs"? If you need the program that runs in the batch job to output something into a file instead of the printer, then, naturally, it will have to be programed accordingly. Also keep in mind that in background only file server is available (OPEN DATASET). So if, say, you want to run a batch job and have it write to your local C drive then it's simply not possible.
    Otherwise please clarify the question.

  • Maintaining Constant Sender Address in the Email of Batch Job

    Hi,
    I have created a smartform whcih will be sent via Batch job at a partcular time .And everytime the Sender Id is "BATCH.JOB". 
    Actually the businesswants the sender address to be XYZ.com instead of BATCH.JOB
    Iam using the below FM to send email.
    Can anyone help in this issue.
    CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
         EXPORTING
              document_data              = l_doc_data_objl
             document_type              = 'RAW'
              put_in_outbox              = 'X'
         IMPORTING
              sent_to_all                = l_sent_all
         TABLES
              object_content             = l_contents
              receivers                  = l_receivers
         EXCEPTIONS
              too_many_receivers         = 1
              document_not_sent          = 2
              document_type_not_exist    = 3
              operation_no_authorization = 4
    Helpful answers will be rewarded.
    Regards
    Naveen

    Hi,
    Sorry for the delay. We can create a Outlook Inbox rule to achieve it. Please click Inbox > Rules > Manage Rules & Alerts > New Rule to create a rule with the following conditions and actions:
    Please change “people or public group” to [email protected] and edit a specific template by clicking “a specific template” in the action part.
    Hope it helps.
    Regards,
    Winnie Liang
    TechNet Community Support

  • Batch job for collecting Blocked Deliveries

    Hi,
    Can anyone help me, i need to collect all the orders that have been blocked for delivery and send the results to an email address.
    I created a batch job gave the program for SD Documents blocked for deliveries, but it doesnt seem to work, can anyone please give a step by step procedure.
    Thanks alot,
    Michelle.

    1. T.code SM36- Here you will creating the job
    2. Give the appropriate variants and the back ground user id
    3. once this is done, go to the Spool receipient and give the email id where you want to send the mail to. Run the job now. You should receive the mail now, provide the connections are maintained.
    Hope this will resolve the issue.
    Mani

  • Why am getting this ME083 error in BATCH JOB, where as ONLINE not getting?

    Hi Experts,
    Am creating Purchse Requisation by using BAPI ---> BAPI_PR_CREATE.
    If I run ONLINE, Purchse Requisations are creating in EBAN table, with out any erorr messages, fine.
    If the same prog. is scheduled as BATCH JOB in production, the Purchse Requisations are creating, fine, but, there is a ERROR MESSAGE in JOB LOG, saying that " ENTER PLANT " of M essage ID& # is  "ME 083 "
    So, let me know that,
    1 - Why am not getting this error message, If I run it ONLINE?
    2 - Even though there r error message in JOB LOG (as I mentione din the above), Why the Purc. requisations are creating?
    3 - How to track that, from Where this error is coming in BATCH JOB, How to debug the BATCH JOB, after its scheduling?
    4 - How to fix it?

    It is not uncommon for informational/warning messages to appear when a BAPI is run in batch.
    Such messages do not prevent the completion of a job, but may provide information about the status of processing.
    When you run the job online the message may just flash briefly on the bottom of the screen, and you might not even notice it.
    I get similar messages when I run other BAPIs, where the message is logged but the process continues to run.
    To address the question of the message itself, if you look at the code underlying the BAPI, for example, include L2105I01, which contains the methods, you can see the place where the message is issued.
    The message is issued if field PR_TYPE in the header structure is initial.
    This is fairly easy to find just by examining the source behind the BAPI and the methods that it uses.
    You can navigate to include L2105I01 just by clicking on Method process in BAPI_PR_CREATE, just as you can with any other navigable object in ABAP.
    You should see this in BAPI_PR_CREATE around line 108.
    CALL METHOD l_ref_bapi->process( ).
    Double click on process.
    Method renumbering is then called by Method process if the actyp = hin (a constant meaning add/create which is set in BAPI_PR_CREATE), and if ITEM_INTVL (Item number interval) is not initial.
    Double click on Method renumbering.
    Method renumbering then checks if field PR_TYPE is initial, and if it is, then the message 083 that you are getting will be issued.  You will also see that the message is issued as a warning only, which is why the document is still created.
    You can drill down through the code by double clicking, as usual with navigation.
    I found this initially by clicking method set_header, which brought up the include with the method code.  I then searched for 083, which is the message id.  I then backtracked to find out what the path to Method renumbering was.
    Always do a little digging in the source, the message has to come from somewhere.  If the first search does not get a hit, try the next one until you exhaust the possibilities.  I chose set_header, since it appeared to be specific to the function of the BAPI, and something like that will usually be the best place to start.  In this case, it took me right to it.
    Brian

  • Reduce/Eliminate the start up time for a batch job

    I'm looking for ideas on how I might be able to modify either my jobs, workflow or data flow in an effort to reduce the "start up" time that I'm encountering.
    Currently I have a batch job we execute several hundred times a day. One of the parameters we pass to this job is a file path. The data flow reads a flat text file in this file path, processes the data through several transforms, and writes a flat text file back into the file path.
    The actual processing time varies with the number of records being processed -- as one would expect.
    However, even for the smallest - single record - input file the job takes between 40 and 50 seconds to complete. If I watch the trace file during this time it appears that 95% of this time is spent getting ready to run the job. The actual processing is almost instantaneous.
    Is there anything that I can look at changing in order to improve the overall performance of these jobs?
    I should mention that I am aware of setting up real time jobs, and how they would not require this "start up" time for each job submitted. However this jobs we process could between 1 to 1,000,000 records. Passing that many records in a single web service call does not seem reasonable. I would deal with issue on the submission side and then the potential timeout issue when waiting on the response -- which could also be quite large.

    Thanks Michael --
    I must admit I'm a bit lost when it comes to the issue of codepages.
    Is there any documentation you could refer me to with regard to setting the correct codepage for the data sources and targets?
    Also, from the trace log I see the following statement:
    Changed engine runtime locale <eng_us.cp1252> to <Unicode (UTF-16)> because data flow <DF_Suppression> contains a transform that requires processing with the Unicode (UTF-16) code page.
    Other than the data source and data targets I do not see any option to set, or change, the codepage within any of transforms that I am using. (URAC, Name Cleanse, Query, Case, Match transforms are used)
    Right now my source and targets are set to "default", which would seem to need to be changed. Where is the "default" set?
    Sorry for so many questions about this.

  • Spool not getting created in batch job

    Hello experts,
    We have a requirement of printing BA00, BA01 and LD00 from different application.
    We have done same code for all BA00, BA01, and LD00.
    Normally the code is working fine except in few cases, when batch job is created but spool is not created.
    DATA: job_name TYPE tbtcjob-jobname,
                  number   TYPE tbtcjob-jobcount,
                  print_parameters TYPE pri_params,
                  wv_pripar    TYPE pri_params,
                  wv_arcpar    TYPE arc_params,
                  wv_val       TYPE c VALUE 'X',
                  wv_false     TYPE c VALUE 'X',
                  gv_mandt     TYPE tsp01-rqclient,
                  gv_user      TYPE tsp01-rqowner.
              CLEAR: gv_mandt, gv_user, number.
              gv_mandt = sy-mandt.
              gv_user  = sy-uname.
              job_name = 'DELIVERY_PRINTING'.
              CLEAR: range1.
              range1-sign = 'I'.
              range1-option = 'EQ'.
              range1-low = 'LD00'.
              CLEAR: range1-high.
              APPEND range1 TO range.
              CALL FUNCTION 'JOB_OPEN'
                EXPORTING
                  jobname          = job_name
                IMPORTING
                  jobcount         = number
                EXCEPTIONS
                  cant_create_job  = 1
                  invalid_job_data = 2
                  jobname_missing  = 3
                  OTHERS           = 4.
              IF sy-subrc = 0.
                SUBMIT sd70av2a WITH  rg_kschl IN range
                                WITH  rg_vbeln IN deli_tab
                                TO SAP-SPOOL
                              SPOOL PARAMETERS print_parameters
                              WITHOUT SPOOL DYNPRO
                              VIA JOB job_name NUMBER number
                              AND RETURN.
                IF sy-subrc = 0.
                  CALL FUNCTION 'JOB_CLOSE'
                    EXPORTING
                      jobcount             = number
                      jobname              = job_name
                      strtimmed            = 'X'
                    EXCEPTIONS
                      cant_start_immediate = 1
                      invalid_startdate    = 2
                      jobname_missing      = 3
                      job_close_failed     = 4
                      job_nosteps          = 5
                      job_notex            = 6
                      lock_failed          = 7
                      OTHERS               = 8.
                  IF sy-subrc <> 0.
                  ENDIF.
                ENDIF.
                WAIT UP TO 10 SECONDS.
    ** to give the data to the printer***
    *            CLEAR gv_rqident.
                SELECT SINGLE listident INTO gv_listident FROM tbtcp
                              WHERE jobname = job_name
                               AND  jobcount = number.
              IF sy-subrc = 0.
                MOVE gv_listident to gv_rqident.
                CALL FUNCTION 'RSPO_OUTPUT_SPOOL_REQUEST'
                  EXPORTING
                    spool_request_id = gv_rqident.
              ENDIF.
    The same code is for all the output BA00, BA01 and LD00.
    The issue is that for few batch jobs (which is created in the above code) , spool is not getting created.
    Thanks and Regards,
    Paritosh Pandey

    Hi,
    The code starting from WAIT UP TO 10 SECONDS. - not only does it look attrocious, is error prone (if no free process for executing batch job is available for 10 seconds, or if the job runs for more than 10 seconds, what will happen...?), but seems utterly unnecessary... Is there any reason immediate spool output can not be handled by simply setting PRINT_PARAMETERS-PRIMM = 'X'?
    cheers,
    Janis
    Edit in:
    Ok, i just read Document in spool but not printed... Do not use an output device relying on frontend access methods to do printing from background processing. Frontend is not available during background processing, period. To my knowledge there is no easy, clean solution to this problem other than defining and assigning, per user, output devices not relying on frontend printing. What if the dialog user has logged off by the time batch job finishes..? May the spool remain unprinted?
    Has the SAP Basis refused to define output devices (I have hard time believing this...)? Well, tell them one time to stop being silly and if they do not cooperate, tell the owner of the requirement that it can not be implemented due to uncooperative Basis then... and that the users will have to keep going to SP01 and manualy start the output!
    Message was edited by: Jānis B

  • Subject in the mail sent through Batch Job

    Hi,
    We have a batch job which is running daily.
    Consumer wants the output of the batch job (spool request) in mail. We generally send the mail from batch job by filling the mail id in "Title field".. there is some third party involved in managing spool requests..
    But now consumer wants to send the mail with a subject line filled..
    I could not find any field or option in SM36 where i can fill in the subject..
    Please help. Now we are getting the subject as user id + spool request + system number.

    Check the below Code.
    DATA: NUMBYTES TYPE TST01-DSIZE,
            PDFSPOOLID TYPE TSP01-RQIDENT.
      DATA: BEGIN OF PDFDATA OCCURS 0.
              INCLUDE STRUCTURE TLINE.
      DATA: END OF PDFDATA.
      DATA: G1_LINES_TXT  TYPE I.
      DATA  : L_DOCUMENT_DATA    TYPE SODOCCHGI1,
              T_PACKING_LIST     TYPE STANDARD TABLE OF SOPCKLSTI1,
              W_OBJHEAD TYPE SOLI_TAB,
              T_OBJBIN TYPE STANDARD TABLE OF SOLISTI1,
              T_OBJTXT  TYPE STANDARD TABLE OF SOLISTI1,
              LW_PACKING_LIST    TYPE SOPCKLSTI1,
              L_LINES            TYPE I,
              W_RECEIVER        TYPE SOMLRECI1,
              T_RECEIVER         TYPE STANDARD TABLE OF SOMLRECI1.
      DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS  2 WITH HEADER LINE.
      DATA: OBJHEAD LIKE SOLISTI1   OCCURS  1 WITH HEADER LINE.
      DATA: OBJBIN  LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE.
      DATA: OBJTXT  LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE.
      DATA: RECLIST LIKE SOMLRECI1  OCCURS  5 WITH HEADER LINE.
      DATA: DOC_CHNG LIKE SODOCCHGI1.
      DATA: TAB_LINES LIKE SY-TABIX.
    *...Read the Spool request number generated.
      SELECT MAX( RQIDENT ) INTO G_SPOOL_NUM
                            FROM TSP01
                            WHERE RQCLIENT = SY-MANDT AND
                            RQOWNER = SY-UNAME.
    *....Convert Spool to PDF
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          SRC_SPOOLID              = G_SPOOL_NUM
          NO_DIALOG                = 'X'
          DST_DEVICE               = G_PDEST
        IMPORTING
          PDF_BYTECOUNT            = NUMBYTES
        TABLES
          PDF                      = PDFDATA
        EXCEPTIONS
          ERR_NO_ABAP_SPOOLJOB     = 1
          ERR_NO_SPOOLJOB          = 2
          ERR_NO_PERMISSION        = 3
          ERR_CONV_NOT_POSSIBLE    = 4
          ERR_BAD_DESTDEVICE       = 5
          USER_CANCELLED           = 6
          ERR_SPOOLERROR           = 7
          ERR_TEMSEERROR           = 8
          ERR_BTCJOB_OPEN_FAILED   = 9
          ERR_BTCJOB_SUBMIT_FAILED = 10
          ERR_BTCJOB_CLOSE_FAILED  = 11
          OTHERS                   = 12.
    *...Convert 132 char to 255 char
      LOOP AT PDFDATA.
        TRANSLATE PDFDATA USING ' ~'.
        CONCATENATE GD_BUFFER PDFDATA INTO GD_BUFFER.
      ENDLOOP.
      TRANSLATE GD_BUFFER USING '~ '.
      DO.
        IT_MESS_ATT = GD_BUFFER.
        APPEND IT_MESS_ATT.
        SHIFT GD_BUFFER LEFT BY 255 PLACES.
        IF GD_BUFFER IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    Creating the document attachment
      LOOP AT IT_MESS_ATT.
        OBJBIN = IT_MESS_ATT.
        APPEND OBJBIN.
        CLEAR: OBJBIN,
               IT_MESS_ATT.
      ENDLOOP.
    Creating the document to be sent
      DOC_CHNG-OBJ_NAME = 'IG Balance'.
    *.....Subject of the email.
      CONCATENATE 'Intragroup Confirmation from AoO: ' P_ZAOO INTO DOC_CHNG-OBJ_DESCR.
    DOC_CHNG-OBJ_DESCR = 'Intragroup Confirmation from AoO '.
    *...Body of the email
      OBJTXT = 'Please find attached a summary and details '.
      APPEND OBJTXT.
      OBJTXT = 'Any queries regarding the attached should be addressed to the contact names on the Report.'.
      APPEND OBJTXT.
      DESCRIBE TABLE OBJTXT LINES TAB_LINES.
      READ TABLE OBJTXT INDEX TAB_LINES.
      DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
    Creating the entry for the compressed document
      CLEAR OBJPACK-TRANSF_BIN.
      OBJPACK-HEAD_START = 1.
      OBJPACK-HEAD_NUM   = 0.
      OBJPACK-BODY_START = 1.
      OBJPACK-BODY_NUM   = TAB_LINES.
      OBJPACK-DOC_TYPE   = 'RAW'.
      APPEND OBJPACK.
      DESCRIBE TABLE OBJBIN LINES TAB_LINES.
      OBJHEAD = 'Balace.PDF'. APPEND OBJHEAD.
    Creating the entry for the compressed attachment
      OBJPACK-TRANSF_BIN = 'X'.
      OBJPACK-HEAD_START = 1.
      OBJPACK-HEAD_NUM   = 1.
      OBJPACK-BODY_START = 1.
      OBJPACK-BODY_NUM   = TAB_LINES.
      OBJPACK-DOC_TYPE   = 'PDF'.
      OBJPACK-OBJ_NAME   = 'ATTACHMENT'.
      OBJPACK-OBJ_DESCR = 'Balance Report'.
      OBJPACK-DOC_SIZE   = TAB_LINES * 255.
      APPEND OBJPACK..
    Entering names in the distribution list
      DATA: L_CNT TYPE I.
      LOOP AT T_EMAIL INTO W_EMAIL.
        IF W_EMAIL-ZCONTACT1 IS NOT INITIAL.
          RECLIST-RECEIVER = W_EMAIL-ZCONTACT1.
          RECLIST-REC_TYPE = 'U'.
          L_CNT = L_CNT + 1.
        ELSEIF W_EMAIL-ZCONTACT2 IS NOT INITIAL.
          RECLIST-RECEIVER = W_EMAIL-ZCONTACT2.
          RECLIST-REC_TYPE = 'U'.
          L_CNT = L_CNT + 1.
        ENDIF.
        APPEND RECLIST.
        CLEAR: RECLIST,
               W_EMAIL.
      ENDLOOP.
      SELECT SINGLE ZAOO
                     ZCONTACT1
                     ZCONTACT2 FROM ZFI_MT_RPTRMAP INTO W_EMAIL
                     WHERE ZAOO EQ P_ZAOO.
      IF W_EMAIL-ZCONTACT1 IS NOT INITIAL.
        RECLIST-RECEIVER = W_EMAIL-ZCONTACT1.
        RECLIST-REC_TYPE = 'U'.
        L_CNT = L_CNT + 1.
        APPEND RECLIST.
      ELSEIF W_EMAIL-ZCONTACT2 IS NOT INITIAL.
        RECLIST-RECEIVER = W_EMAIL-ZCONTACT2.
        RECLIST-REC_TYPE = 'U'.
        L_CNT = L_CNT + 1.
        APPEND RECLIST.
      ENDIF.
    Sending the document
      IF L_CNT > 0.
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            DOCUMENT_DATA              = DOC_CHNG
            PUT_IN_OUTBOX              = 'X'
            COMMIT_WORK                = 'X'
          TABLES
            PACKING_LIST               = OBJPACK
            OBJECT_HEADER              = OBJHEAD
            CONTENTS_BIN               = OBJBIN
            CONTENTS_TXT               = OBJTXT
            RECEIVERS                  = RECLIST
          EXCEPTIONS
            TOO_MANY_RECEIVERS         = 1
            DOCUMENT_NOT_SENT          = 2
            OPERATION_NO_AUTHORIZATION = 4
            OTHERS                     = 99.
        CASE SY-SUBRC.
          WHEN 0.
            WRITE 'Email sent successfully'.
          WHEN 1.
            WRITE: / 'no authorization to send to the specified number of recipients!'.
          WHEN 2.
            WRITE: / 'document could not be sent to any of the recipients!'.
          WHEN 4.
            WRITE: / 'no authorization to send !'.
          WHEN OTHERS.
            WRITE: / 'error occurred during sending !'.
        ENDCASE.
      ELSE.
        MESSAGE S000 WITH TEXT-018.
        STOP.
      ENDIF.
    *...Delete Spool Request.
      DATA: SPOOLID TYPE TSP01_SP0R-RQID_CHAR.
      SPOOLID = G_SPOOL_NUM.
      CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
        EXPORTING
          SPOOLID             = SPOOLID
      IMPORTING
        RC                  =
        STATUS              =
        ERROR_MESSAGE       =

  • SAP Foreign Trade- Search commodity code by keyword

    Hello,
    In the IMG, I noticed a configuration area titled "Maintain Keywords for Commodity Codes". I was wondering if anyone could give me a hint as to how to take advantage of this (without abap would be wonderful)? I have searched help and OSS, but can't seem to find anything. I was hoping it would enable the user to type a keyword into the comm. code field on the material master and the system return a number of matches... Any ideas?
    Thanks in advance!!!

    Hi Jeff,
    What sap syays on this!
    Before you can calculate the duties that must be paid on your imported goods, you must correctly classify the product based on its commodity code or import code number (the first six digits are always the same internationally). These codes are found in the Harmonized Commodity Description and Coding System (usually known as the HS or Harmonized System). Once you have determined the code for the goods, you can determine the rate of duty in the harmonized tariff schedule. Tariff schedule rates differ for each country and, in cases involving a quota, these rates are usually higher once the quota
    Code from the Harmonized Commodity Description and Coding System (usually known as the HS or Harmonized System). These codes provide a standard way to identify materials for a country's export and import reporting systems.
    The first six digits of a material's code number are standard internationally, but each country adds extra digits to the codes to further assign materials in its own classification system. In the USA and Japan, commodity codes are 10 digits in length. In Europe, the length of these codes vary from 8 to 12 digits. Codes used for importing goods tend to be longer in length than those used for export.
    Additional information for USA:
    In the US, codes from the Harmonized Tariff Schedule of the USA (HTSUSA) are used to classify import goods. With a few exceptions that are outlined in a notice to exporters, it may also be used to classify export goods. Schedule B is the official listing of commodity classifications used by shippers to report export shipments from the United States and in compiling the official statistics on exports of merchandise from the U.S.
    Hope this helps you.
    Thank you.
    Regards,
    Karun.M

Maybe you are looking for