How to save the material of MM01 into MARA table with customer Distribution

Hi to everyone.
This is first project of mine.
There is some modification in TC VA01.
We should write a code in standard program. I'll show the Enhancement below.
Our Client wants to move the material distribution channel (M.DC) to customer's distribution channel (C.DC) if Customer Sales Organization and Material Sales Organization are equal.
IF ( Customer Sales Organization and Material Sales Organization are equal)
check for there distribution channel whether its equal.
If ( C. Dc and M.Dc) are equal.
some process.
else (c.Dc not equal to m. Dc)
Move (M.Dc to C. Dc)
follow the same process.
Where do we have to  add this enhancement in the program.
Please help me out, its very urgent.
Thanks and Regards in advance.
A.Rafique

i think u have to check customer+material table that is MVKE .
Regards
prabhu

Similar Messages

  • How to save the workbook's result into table ?

    Dear all:
    Now  I need to output the workbook's result into ta table ,what can i do now?
    If I save a query's result into a table use rscrm_bapi,if the query have two structures ,the result table looks not well, how can do do?

    Read the help files about APD

  • How to save the item without displaying into the Page

    hi
    I have the reqt to save the item without displaying into the Page.
    thanx

    In your yyy Table View Object create one attribute for BusinessGroupId as you want to save it in your yyy table VO.
    Now on click of save button capture this ViewObject and set this VO Attribute at run time. I am assuming that yyytableVO is EO based.
    Snippet
    Controller PFR Code
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    pageContext.getParameter("Save") != null)
      OAViewObject vo = (OAViewObject)am.findViewObject("yyyTableVO");
      if (vo != null)
         vo.getCurrentRow.setAttribute("BusinessGroupId", value);//value is what you have capture from pageContext.getparameter
    }Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to save the results of patindex into a variable?

    I would like to save the results of a patindex into a variable. The commented out line below is the line with the problem.
    CREATE TABLE #LocalTempTable(
    UserID int,
    UserName varchar(50),
    UserAddress varchar(150))
    insert #LocalTempTable (UserID,UserName,UserAddress) values (0,'user1','1209 West 9999 East|$75|this one')
    declare @var1 int
    set @var1 = -99
    select patindex('%West%', UserAddress) from #LocalTempTable
    --select patindex('%West%', UserAddress) into @var1 from #LocalTempTable
    select @var1
    -- The desired result would be a number 6 in the variable @var1

    Assume you will have a where condition as well:
    CREATE TABLE #LocalTempTable(
    UserID int,
    UserName varchar(50),
    UserAddress varchar(150))
    insert #LocalTempTable (UserID,UserName,UserAddress) values (0,'user1','1209 West 9999 East|$75|this one')
    --insert #LocalTempTable (UserID,UserName,UserAddress) values (0,'user1','1209 East 9999 East|$75|this one')
    declare @var1 int
    set @var1 = -99
    select @var1=patindex('%West%', UserAddress) from #LocalTempTable --where UserID=0
    --select patindex('%West%', UserAddress) into @var1 from #LocalTempTable
    select @var1
    Drop table #LocalTempTable

  • How to upload the flat file records into internal table by position?

    Hi
    I have a flat file which has 7 records in each row and they are NOT provided with CSV or Tab demilited...
    They are continous text without spaces....
    but i know the fixed length of each field Eg : 1st field 7 char and seconc field 3 char and so on...
    How can i upload this file into internal table by reading positions of each field...I know we can use GUI_UPLOAD and Read dataset and Open dataset...
    But please let me know to read the file with the fixed postions and load into internal table...
    Thanks in advance
    MM

    Hi
    As per my knowledge i dont think thr is some function module or so to read with a fixed positions.
    You can use the below method if you think this is the best way.
    Suppose your file has
    types : begin of ty_itab,
                field1 type char7,
                field2 type char3,
                field3 type chat3,
                field4 type char3,
                end of ty_itab.
    types : begin of ty_upload,
                 str type string,
                end of ty_upload.
    data : it_itab type standatd table of ty_itab,
              it_upload type standard table ot ty_upload,
              wa_itab type ty_itab,
              wa_upload type ty_upload.
    use gui_upload.get the data in it_upload.
    here you know that u have first 16 charcters makes a first row n then next 16 charcters next row
      Loop at it_upload into wa_upload.
       v_len =  strlen ( wa_upload ).
       v_len = v_len / 16.
        You get number of rows per record ,if it is decimal value make it final value if 3.9 make to 4.
        do v_len times.
          wa_itab = wa_upload.
          By this only first 16 characters are moved and respective fields will get a value.or else u can use offset
           wa_upload+0(16).
          append wa_itab to it_itab.
          Now shift 16 characters using shift command in wa_upload.
        enddo.
      endloop.
    Hope this syntax help you to resolve your issue.May be something i have missed .Right now i don't have sap system to send you the full correct syntax code.
    Cheers
    Joginder

  • How to convert the flat file data into sap tables . ?

    how to upload flat file data into sap table . before upload mapping is also there in some filds . any one can give me some steps how to upload and mapping . ?

    Hi
    See the sample code
    REPORT zmmupload.
    Internal Table for Upload Data
    DATA: i_mara like MARA occurs 0 with header line
    PARAMETERS: p_file LIKE ibipparms-path.  " Filename
    At selection-screen on Value Request for file Name
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    Get the F4 Values for the File
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
        IMPORTING
          file_name     = p_file.
    Upload the File into internal Table
      CALL FUNCTION 'UPLOAD'
        EXPORTING
          filename                = p_file
          filetype                = 'DAT'
        TABLES
          data_tab                = i_mara
        EXCEPTIONS
          conversion_error        = 1
          invalid_table_width     = 2
          invalid_type            = 3
          no_batch                = 4
          unknown_error           = 5
          gui_refuse_filetransfer = 6
          OTHERS                  = 7.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Upload the Data from Internal Table
      MODIFY MARA from TABLE i_MARA.
    Regards
    Anji.

  • How to write the code to insert into attendance table

    Hi,
    I have a report
    class lov (through which all the classes will be selected).
    once any class seleted from the list it will display all the students in the class
    my query in the report was
    SELECT FIRST_NAME || ' ' || SURNAME "Pupil_Name",
    er.pupil_number,
    APEX_ITEM.CHECKBOX(1,er.pupil_number) "tickthebox"
    FROM PEAS_PUPIL pu, PEAS_ENROLMENT_REGISTER er
    WHERE pu.pupil_number = er.pupil_number
    AND er.class_id = :P53_CLASS
    pupil number column hidden becuase its a pk.
    as pupil_name and checkbox (called tickthebox)
    now I HAVE written on submit process to insert records into attendance table see below
    for i in 1..apex_application.g_f01.count loop --- check is the selector checbox, pupil_number is the hidden column with the table's PK
    INSERT INTO PEAS_ATTENDANCE (ATTENDANCE_ID,PUPIL_NUMBER) VALUES
    attendance_seq.NEXTVAL,
    APEX_APPLICATION.G_F01(i)
    end loop;
    but this is only inserting checked records ...not inserting unchecked records.
    is there anyway i can insert both checked and unchecked records into tABLE.
    THANKS
    PRASAD

    What I mean is that if you want to use checkbox item you must compare its value to current row ID.
    You have two items containing pupil_number:
    - APEX_ITEM.CHECKBOX(1,er.pupil_number)
    - APEX_ITEM.HIDDEN(2,er.pupil_number)
    When you call first one like "FOR i in 1 .. apex_application.g_f01.COUNT", you will get only pupil_numbers of checked checkboxes.
    When you call second one like "FOR i in 1 .. apex_application.g_f02.COUNT", you will get pupil_numbers of all rows.
    You get "no data error" because you reffer in your process to variable apex_application.g_f01(i) for row i, that is not checked.
    That's why you should check in your process if current row is checked every time when you want to reffer to this checkbox. You can do it using this code:
    FOR i in 1 .. apex_application.g_f02.COUNT
    LOOP
    FOR j in 1 .. apex_application.g_f01.COUNT
    LOOP
    IF apex_application.g_f01(j) = apex_application.g_f02(i) THEN
          /Your process for checked records/
    END IF;
    END LOOP;
          /Your process for unchecked records/
    END LOOP;And I think you should modify your report query for:
    SELECT FIRST_NAME || ' ' || SURNAME "Pupil_Name",
    APEX_ITEM.HIDDEN(2,er.pupil_number)||APEX_ITEM.CHECKBOX(1,er.pupil_number) "tickthebox"
    FROM PEAS_PUPIL pu, PEAS_ENROLMENT_REGISTER er
    WHERE pu.pupil_number = er.pupil_number
    AND er.class_id = :P55_CLASSYou can find some interesting information about using checkbox in APEX help.
    Regards,
    Przemek

  • How to generate the insert staments of all schema tables with one DBPROC

    [code]CREATE DBPROC SCHEMA_INSERT_SCRIPT
    AS
    VAR L_STATEMENT VARCHAR(500) ;
    L_COL_NAME VARCHAR(50);
    L_ALL_TAB_COLS VARCHAR(400);
    L_TAB_NAME VARCHAR(50);
    L_SQL VARCHAR(1000);
    TRY
          SET L_ALL_TAB_COLS = ' ';
          DECLARE C_TAB_CUR CURSOR
          FOR
            SELECT T.TABLENAME,C.COLUMNNAME
            FROM DOMAIN.TABLES T, DOMAIN.COLUMNS C
            WHERE T.OWNER='SCOTT2'
            AND T.TABLENAME = C.TABLENAME
            AND  T.TABLENAME='DEPT';
          WHILE $RC = 0 DO
          BEGIN
          FETCH C_TAB_CUR INTO :L_TAB_NAME, :L_COL_NAME;
    SET L_ALL_TAB_COLS = L_ALL_TAB_COLS || L_COL_NAME || ',';
          DELETE FROM SCOTT2.QUERY;
    INSERT INTO SCOTT2.QUERY VALUES
    ('insert  into '||TRIM( :L_TAB_NAME) ||
    '(' || SUBSTR(:L_ALL_TAB_COLS,1,LENGTH(:L_ALL_TAB_COLS)-1)||
    INSERT INTO SCOTT2.QUERY VALUES( 'values (');
       END;
        CATCH   
        CLOSE C_TAB_CUR;[/code]
    till now i am getting output as
    insert into DEPT(DEPTNO,DNAME,LOC)
    values (
    but i want output from this procedure as
    insert into DEPT(DEPTNO,DNAME,LOC)
    values (10,'SALES','NEWYORK')
    so kindly help me out how can i access the data from tables and create the insert statements of the table.
    with this above Procedure,i want to generate the insert statments of the table.
    please advice me how can i go.
    thanks,Bhupinder

    Hi,
    from what I understand from your post, the thing that's missing is the retrieval of the data from the tables and its types. This could be done very similar to your already done tablespecs, just perform a select, use a cursor again and in there, make sure that character (etc.) fields get surrounded by '' and integers not.
    Regards,
    Roland

  • How to get the bound object of an external table with OMB

    Hello,
    I try to find it but without success. So may be one of you, know this secret information.
    I want to synchronize with the help of an OMB script my external tables.
    OMBSYNCHRONIZE FLAT_FILE '/MY_PROJECT/MY_FLAT_FILE_MODULE/MY_FLAT_FILE' RECORD 'MY_RECORD' TO EXTERNAL_TABLE 'MY_EXTERNAL_TABLE' \
    USE (RECONCILE_STRATEGY 'REPLACE', MATCHING_STRATEGY 'MATCH_BY_OBJECT_ID')For this purpose, I need to know the bound object. When you synchronize with the help of the GUI, you see it easily.
    Example:
    /MY_PROJECT/MY_FLAT_FILE_MODULE/MY_FLAT_FILE/MY_RECORDI searched in the properties of the external table and I don't see a BOUND OBJECT property.
    OMBDESCRIBE CLASS_DEFINITION 'EXTERNAL_TABLE' GET PROPERTY_DEFINITIONS
    BAD_FILE_LOCATION BAD_FILE_NAME BUSINESS_NAME DATA_FILES DEPLOYABLE DESCRIPTION
    DISCARD_FILE_LOCATION DISCARD_FILE_NAME ENDIAN GENERATE_ERROR_TABLE_ONLY GENERAT
    ION_COMMENTS LOAD_NULLS_WHEN_MISSING_VALUES LOG_FILE_LOCATION LOG_FILE_NAME NLS_
    CHARACTERSET NUMBER_OF_REJECTS_ALLOWED PARALLEL_ACCESS_DRIVERS PARALLEL_ACCESS_M
    ODE REJECTS_ARE_UNLIMITED SHADOW_TABLESPACE SHADOW_TABLE_NAME STRING_SIZES_IN TR
    IM UOIDThen I try the BOUND_OBJECT cached properties of a mapping operator but no luck.
    OMBRETRIEVE EXTERNAL_TABLE 'MY_EXTERNAL_TABLE' GET BOUND_OBJECT
    OMB00001: Encountered BOUND_OBJECT at line: 1, column: 56. Was expecting one of:
    "PROPERTIES" ...
        "REF" ...
        "REFERENCE" ...
        "COLUMN" ...
        "DEFAULT_LOCATION" ...
        "FLAT_FILE" ...
        "RECORD" ...
        "COLUMNS" ...
        "DATA_FILES" ...
        "DATA_RULE_USAGES" ...I have already the file and the record with the FLAT_FILE and RECORD properties
    OMBRETRIEVE EXTERNAL_TABLE  'MY_EXTERNAL_TABLE'  GET FLAT_FILE
    OMBRETRIEVE EXTERNAL_TABLE  'MY_EXTERNAL_TABLE'  GET RECORDBut how can I get the flat file module:
    MY_FLAT_FILE_MODULEDoes anybody know how OWB retrieve this information ?
    Thanks in advance and good day
    Nico
    Edited by: gerardnico on Jan 13, 2010 12:08 PM
    Change get the location by get the flat_file_module

    Yes, Oleg. It's what's worried me.
    The BOUND_OBJECT property of a table operator is not in the API.
    OMBDESCRIBE CLASS_DEFINITION 'TABLE_OPERATOR' GET PROPERTY_DEFINITIONS
    ADVANCED_MATCH_BY_CONSTRAINT AUTOMATIC_HINTS_ENABLED BOUND_NAME BUSINESS_NAME CO
    NFLICT_RESOLUTION DATABASE_FILE_NAME DATABASE_LINK DATA_COLLECTION_FREQUENCY DAT
    A_RULES DB_LOCATION DEBUG_BOUND_NAME DEBUG_DB_LOCATION DESCRIPTION DIRECT ENABLE
    _CONSTRAINTS ERROR_SELECT_FILTER ERROR_SELECT_ROLL_UP ERROR_TABLE_NAME EVALUATE_
    CHECK_CONSTRAINTS EXCEPTIONS_TABLE_NAME EXTRACTION_HINT IS_TEMP_STAGE_TABLE JOIN
    RANK KEYS_READONLY LOADING_HINT LOADING_TYPE MATCH_BY_CONSTRAINT OPTIMIZE_MERGE
    PARTITION_NAME PEL_ENABLED PRIMARY_SOURCE RECORDS_TO_SKIP REPLACE_DATA ROW_COUNT
    ROW_COUNT_ENABLED SCHEMA SINGLEROW SORTED_INDEXES_CLAUSE SUBPARTITION_NAME TARG
    ET_FILTER_FOR_DELETE TARGET_FILTER_FOR_UPDATE TARGET_LOAD_ORDER TEMP_STAGE_TABLE
    _EXTRA_DDL_CLAUSES TEST_DATA_COLUMN_LIST TEST_DATA_WHERE_CLAUSE TRAILING_NULLCOL
    S TRUNCATE_ERROR_TABLE UOID USE_LCR_APIThen I was wondering if anyone knew a little bit the same hidden property but to get the flat file source object of an external table.
    Cheers
    Nico

  • How to check the number of rows in a table with input data?`

    Dear all,
    I am having a table ( with declaration of 5 rows during the init ) there's a next button which will add another 5 rows by pressing. Let say the user ony key in 7 rows of data.. how should i track it? coz these data act as input to my bapi function. One of the input field of my bapi is to state how many rows of data that a user had key in. Thank you.

    I think ur problem is empty records, u dont want to process empty table rows.
    m I right?
    if yes then just before processing the data / records, check for empty records and remove unwanted rows from the node.
    for (int i = 0; i < TableNode.size(); i++)
             if all cells of row(i) are empty
                   remove row(i) from Table Node.
    OR if you dont want to remove empty rows from display (screen), then at the time of processing, transfer useful rows to a separate node and process that node.
    Best Regards
    Deepak

  • How to save the format at less time while working with a larger format that is over 5 GBs?

    I am working on a 3' x 10' banner with 300dpi in Photoshop and it takes all of my time to do the extra tools to do, and it takes 10 minutes to save it or more.  I have powerbook and CS6 on me.  I put the highest memory in Photoshop preference.  So I am bearing to work with it for hours for one small assigment, but why does it takes so long?  is there a better way to do to save time and speed to make the poster banner to look greater than life? even in 200 dpi?   What are your answer to my solution?  I would be appreciated it.  Thank you

    station_two wrote:
    a 10' banner does not even remotely need to be at 300 ppi...
    A printer worth their salt will know.
    Station two is correct.
    For future reference here are two links to good articles about viewing distance and ppi:
    http://www.digitalphotopro.com/technique/workflow/the-right-resolution
    http://www.northlight-images.co.uk/article_pages/print_viewing_distance.html

  • Hi, How to save UTF-8 encoded string into Mysql DB with jdbc?

    Mysql doesn't support UTF-8, right? is there any way we can bridge it?

    Hi,
    By using the latest versions of MySql and mm mysql jdbc drivers you can
    read and write unicode characters from/into MySql database. You can download
    mm.mysql jdbc driver from http://mmmysql.sourceforge.net/
    We haven't tested this jdbc driver officially.
    Hope this helps.
    Good Luck.
    Gayam.Srinivasa Reddy
    Developer Technical Support
    Sun Micro Systems
    http://www.sun.com/developers/support/

  • How to save the  selected rows from Advance table into database

    Hi
    I have requirement like..
    In custom page , Manager Search the Candidates and selects the candidate ROWS from advance table.
    The reqt is how to save the selected multiple rows into the database.

    hi Reetesh,
    In Custom page
    Supoose the Recruiter Search is for Position Finance Mangager , it retrieves 100 rows , out of which Recruiter select 10 rows .
    So in Such scenario how to save this 10 rows against Recruiter
    , i mean , Is i need to create custom table, to save Recruiter , these selected 10 rows.
    I hope u understand my question

  • How to save the form data into adobe db?

    Hi All,
    How to save the form data into adobe db?
    I have designed one xdp file.
    Through processFormSubmission(), I got the submitted form data as Document obj.
    Then I have called the workflow kickoff program.
    code:
    InvocationRequest request = myFactory.createInvocationRequest ("myprocessname", //Specify the long-lived process name
    "invoke", //Specify the operation name
    params, //Specify input values (HashMap obj)
    false); //Create an asynchronous request
    It successfulyy started the workflow, but the submitted form data is not saved anywhere.
    And also, How get the form data from tables?
    Please provide the solution for the above.
    Thanks in advance.
    Regards,
    Saravanan G

    You need to create a process variable of type IN if you want to be able to pass data to your process. Then the params parameter (HashMap) contains a list of all the IN variables with their content that you want to pass to your process. They key is the name of the variable and the value the content. That way you should get it in your process.
    Now LiveCycle will create a column in the database for every process variable, so the content will be saved in the database just by creating that process variable.
    Jasmin

  • How to save the music received in Whatsapp into iPhone?

    How to save the music received in Whatsapp into iPhone?

    This is not an iphone-specific problem. The person who sent you the files should have known that you cannot save them from WhatsApp person  on any smart phone
    Best help is to Contact whatsup support for iOS at  [email protected]
    I understand you think this is a Apple problem but Apple Haven't created this App

Maybe you are looking for

  • Problem with file archival. Please help

    Hi Experts,   I have a requirement where XI reads input file via File adapter. Once the file is read successfully I need to archive it. I also need to append timestamp to the archived file. After 10 days the archived file should be deleted. How to ac

  • Marquee tool - size converted to text layer?

    Firstly forgive me if this has been covered, the forum search just didn't work, even when searching for a something I could see! I'm wondering if there is a script that would do the following. With a rectangular marquee selection create a new layer s

  • Utilizing auto-increment/identity fields for primary key with "application" identity

    Is it possible to utilise an auto-increment (identity in MS SQL Server) field for the primary key field when using "application" identity?

  • Value is not retaining on a field of item type MessageRichTextEditor

    Hi, In my oaf page, i have a field of item type OAMessageRichTextEditor. And a view attribute of clob type is associated with this item. Whenever the user is entering some sql we are doing checks on the data whether that is a valid sql or not.the pro

  • Flash Player 10.1 for Solaris x86 missing

    Hello, I am having and odd  problem installing 10.1.82.76 on Solaris for x86.  When I get the file  extracted and installed, the version check in Firefox clams that its not  version 10.1.82.76 but 10.0 r45 or 10.0.45.2 as confirmed by http://www.adob