How to maintain the sequence in the custom table

Hi,
We have custom table where we will store the standard text name based on different flags and it will be fetched the value according to the condition.
Example code
SELECT SINGLE field1
                  field2
             INTO  ( vaiable1 variable2 )
             FROM custom table
            WHERE tdobject = iv_signature
              AND bukrs    = vbdkr-bukrs
              AND vkorg    = iv_vkorg
              AND vkbur    = iv_vkbur
              AND lland    = vbdkr-land1
              AND fkart    = vbdkr-fkart
              AND kschl    = iv_kschl.
  CHECK sy-subrc <> 0.
  SELECT SINGLE field1
                  field2
             INTO  ( vaiable1 variable2 )
             FROM custom table
            WHERE tdobject = iv_signature
              AND vkorg    = iv_vkorg
              AND vkbur    = space
              AND fkart    = vbdkr-fkart
              AND kschl    = iv_kschl.
  CHECK sy-subrc <> 0.
SELECT SINGLE field1
                  field2
             INTO  ( vaiable1 variable2 )
             FROM custom table           
            WHERE tdobject = iv_signature
              AND vkorg    = iv_vkorg
              AND vkbur    = space
              AND fkart    = vbdkr-fkart
              AND kschl    = space.
The solution I created to avoid the select is, i have created the FM with all parameter. Addition to the FM, I have created a Table as well to maintain the flag.
New table                                                                               
TDOBJECT   TDID BUKRS VKORG VKBUR KUNNR      MWSKZ AUART VGBEL_AUART KTGRM LLAND FKART WERKS KSCHL STNAME                                                                               
FOOTER                                                                           X     X           ZNET_DICI_FTR_FI  
FOOTER                                                                           X     X           ZNET_DICI_FTR_NL  
FOOTER                X     X                                                    X                                   
i.e. say example if we maintain the value in the custom table based on the first select query. Then we need to maintain the flag in the table which was created newly.
Note In the both field the key fields are same.
The problem now is we have plenty of select query for different condition, i though of maintain the sequences of the entries. But my worry is how many sequence number will be maintained and in what bases it will be maintained.
Could you please help me to resolve this problem?
Regards,
Vijay

Hi,
I got your requirement as,
whenever a new entry is made in the table, one sequence has to be maintained somethign like serial number and everytime it has to be incremented. If it is so, then you can go for an additional field as serial number. Then get the max serial number from the following select query:
select max(serial) from cust_table
into v_serial.
Now, when you make a new entry, just give (v_serial + 1) to serial number...
Please let me know if i understood wrongly... or what you want...

Similar Messages

  • How to create the custom table?

    Hi, how to create the custom table and how to integrate the table with defferent R/3?
    my requiremnt is i have to create the two tables and those i have to integrate with the existed R/3 and using those R/3 i have to update my custom tables .....can give me some idea?
    Tks
    DPk

    how to create the custom table
    There are two approach in creating a table.
    1. Bottom-up approach
    2. Top-down approach.
    Both are valid and you can choose which approach is suitable for you. I always use the bottom-up approach. Here are the steps to create the tables with this approach.
    1. SE11 will take you to the DDIC and enter the name of the new table to be created. Let us say Zname. Click create.
    2. Enter the short discription of the table and enter the field of the table. If it is primary key and you have to check the box.
    3. Enter the data element and double click it, you will be asked to save and will take you to data element discription page. Enter the short discription of the data element and enter the information of domain like the length of field and type of field.
    4. If you wanted to use the existing domain then its fine, or else, you have to create one. Enter the domain name in the data element page and double click it. Page will ask to save and jump to domain creation page.
    5. In the domain page, you have to save the information which you have already given in the data elements page and check it. Before going to data element page, you have to activate the domain.
    6. Go to data element page and save, check and activate.
    7. Go to main table page and save, check, and activate.
    8. Also, you have to save the technical settings of the table.
    The table is now ready for operation. You can use it in your program or you can use it to enter information.
    Check table: It is the table which will have all the information about the Foreign keys which are the primary keys in the check table.
    It can be created by creating the foreign key from the main table. Click foreign key in the main table and it will take you to a page which will ask for table name and field to which foreign key relation has to be associated. Enter the information and you can create the check table automatically.
    SM30 is used for maintenance of the table, that is to realease the errors occured during the creation of the table.
    how to integrate the table with defferent R/3
    Transport the Table to the another server/client/qas/prd
    Kanagaraja L

  • How to download the custom Tables to xls from the system?

    Hi
    How to download the custom Tables to xls from the system?
    Vijay

    Hi,
    Goto SE11, in the table name field give Z*, and click on display. You will get the list of Z tables.
    Regards,
    Prabu

  • Custom transaction has to be created to maintain the custom table

    My requirement is like this:
    We have received the request to create a special transaction to maintain directly the table ZZRPPT_SUBCONPRI (Subcontracting price table).
    Currently the table is accessed through transcation code SM30. Access to this t/code is limited due to the security reasons.
    So new transaction has to be created to maintain this table.
    Could you please suggest in this?
    US

    Hi Srinivas,
    You can create a program and in that you can call the table with the specificied restrictions.
    Maintain the transaction code for that program.
    Assigning the table
    z_view = 'ZZRPPT_SUBCONPRI '.
    For the restriction
    REFRESH z_funct.
    CLEAR z_funct.
    z_funct-function = 'ATAB'.
    APPEND z_funct.
    Lock the table
    CALL FUNCTION 'VIEW_ENQUEUE'
      EXPORTING
        action    = 'E' "E for Lock
        view_name = z_view.
    Call SM30 transaction for 'ZZRPPT_SUBCONPRI'
    CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
      EXPORTING
        action                       = z_action
        view_name                    = z_view
      TABLES
        excl_cua_funct               = z_funct
      EXCEPTIONS
        client_reference             = 1
        foreign_lock                 = 2
        invalid_action               = 3
        no_clientindependent_auth    = 4
        no_database_function         = 5
        no_editor_function           = 6
        no_show_auth                 = 7
        no_tvdir_entry               = 8
        no_upd_auth                  = 9
        only_show_allowed            = 10
        system_failure               = 11
        unknown_field_in_dba_sellist = 12
        view_not_found               = 13
        maintenance_prohibited       = 14
        OTHERS                       = 15.
    Definately the above solution will work out, because i had implemented for many of my customized tables.
    Reward points if helpful.
    Kannu.

  • How maintaining the connection table for sticky/persistent/non-persistent?

    Question about how to maintain the connection table for the source(client) and destination(server) in the CSM(or CSS).
    I know the sticky has the table and max size such as 128K(css11501)as per CCO but not clear how works the persistant and non-persistant case.
    Q1) persistant. does it maintain the conntion table to tracking the session? then, any information the table size?
    Q2) non-persistant. is this also have connection table? then, how it works?
    why I'm asking is want to understand how the session keep tracking. for example, the router based on the routing table(stateless) versus PIX firewall has stateful table. As analogue, is the non-persistnet stateless and statefull for the persistent and sticky?
    Thnaks in advance,

    The CSS uses FCB to maintain information about active connections.
    Each connections requires 2 FCB - one for client to vip and one for server to client.
    When you boot the CSS it will immediately reserver a good amount of memory to create a list of FCB.
    Each connection will then take 2 FCB from the list.
    You can do a 'flow stat' from llama mode to verify how much free/used FCB you have.
    When running low on FCB, the CSS will try to allocate more memory.
    Gilles.

  • How to create the custom infotypes in Campus Management

    Hi,
    Please help me how to create the custom infotypes in campus management.
    Thanks,
    Lakshmi.

    Hi,
    Steps to create a HR Infotype:
    1) Go to Transaction PM01.
    2) Enter the custom Infotype number which you want to create (Should be a 4 digit number, start with 9).
    3) Select the 'Employee Infotype' radio button.
    4) Select the 'PS Structure Infotype'.
    5) Click on Create... A separate table maintenance window appears...
    6) Create a PS structure with all the fields you want on the Infotype
    7) Save and Activate the PS structure
    8) Go back to the initial screen of PM01.
    9) Click on 'All' push button. It takes a few moments.
    10) Click on 'Technical Characteristics'. Infotype list screen appears
    11) Click on 'Change'(pencil) button
    12) Select your Infotype and click on 'Detail' (magnifying glass) button
    13) Give 'T591A' as subtype table
    14) Give 'T591S' as subtype txt tab
    15) Give your subtype field as subtype field
    16) Save and come back to PM01 initial screen
    17) Click on 'Infotype Characteristics' ... Infotype list screen appears
    18) Click on 'Change' (pencil) button
    19) Click on 'New Entries'
    20) Enter your Infotype number and short text
    21) Here we have to set different Infotype Characteristics as per the requirement. (Better open another session with some standard Infotype's infotype characteristics screen and use as the reference to fill yours)
    22) Save your entries.
    23) Now the Infotype is created and ready to use.
    24) If you want to change the layout of the Infotype as per your requirement...
    25) In the PM01 initial screen...Select 'Screen' radio button and give 2000 as the screen name, then click on edit.
    26) In the next screen.. Select 'Layout Editor' and click 'Change'.
    27) Screen default layout appears...here you can design/modify the screen..change the attributes of the fields..etc.
    28) Save and activate. (Don't forget to 'Activate at every level)
    Subtype Creation :
    Transaction PM01 Goto Subtype Characteristics. Click on Append and then subtype. Enter the name and description of subtype on screen.
    Then goto technical Characteristics and maintain the details of subtype there. I.e name of subtype i.e. component name defined in PSnnnn. Subtype table is T591A.
    Subty.text tab is T591S and time const tab is T591A.
    See:
    http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm
    HR related site:
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    Enhancement of Infotype
    Check the following
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAXX/PYINT_INFOTYP.pdf
    Infotype Enhancement overview screen
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60a7586d-edd9-2910-68a8-8204303835a1
    Cheers,
    vasavi.
    kindly reward if helpful.

  • How to Maintain the Pricing Condition Records in CRM

    Hi
    I am new to the CRM
    How to maintain the pricing condition records in crm for the particular condition type?
    as we do in SD(VK11)
    Thanks

    Hi Binu,
    First of all, you could maintain pricing conditions in the following places:
    1. In General Condition Maintenance (GCM)
    2. At the product maintenance level
    3. At the 'Price agreement' tab of Contracts
    4. As manual conditions during order processing at item level
    Now, if you want to maintain conditions using GCM, you first have to maintain a condition maintenance group in the customizing where in you can assign condition table and condition type for different counter values. I am assuming that you have done this activity successfully.
    When you run the transaction '/SAPCND/GCM', for application 'CRM', your condition maintenance group name and context 'GCM', you will be initially taken to a screen where in you'll have an item area which would be blank and then condition fields would be displayed in a tree on the left.
    Here, select the field 'Condition type' and click on icon 'Select records'. You would get a dialog prompting you to enter condition type. Here you can specifiy the condition type for which you want to maintain/view condition records.
    If no condition records are available, item area would be left blank. Here, you can choose a condition type using the standard F4 help. Depending on condition types that are assigned to condition maintenance group, different condition types would be displayed in the F4-help using which you can maintain condition records.
    Hope this helps.
    Regards,
    Pavithra
    **PS: Please reward points if this helps.

  • How to maintain the contact person in Business Partner ?

    Hi Experts,
    Could you help to resolving the below Requirement.
    __  +Requirement:+__
    How to maintain the contact person in Business Partner ?
    How to get the Contact person in Is-Media Documents?
    Thanks& Regards
    Venkat

    Dear Venkat,
    In SD Customer Master data, we can maintain Contact Person in General Data tab page.
    For my knowledge, we can not find u201CContact Personu201D field in ISM Business Partner u2013 General Data. Correct me if I am wrong.
    Mostly user enters the contact person details in u201CSearch Term 1/ 2 fieldu201D in Address tab page in ISM Business Partner u2013 General Data tab page. While creating ISM Billing Document for this Business Partner, system prints this contact person details in ISM Invoices.
    (Or)
    While creating ISM Order, user can maintain Contact Person name in Header Details(Click on u201CGo to >Header>Details>Purchase Order Data>Cont.Person)
    If you maintain Contact Person name in Header Details also, system print this contact person details in ISM Invoices.
    Check from your end.
    Best Regards,
    Chandramohan

  • How the data is entered  in the customized table

    Hi,
    In implemenation scenario when we create generic extraction ,   how the data is entered
    in the customized table if it is huge data  ( around 5000 records)
    Regards,
    Vivek

    Hi Vivek,
    Follow bellow steps:
    1.Goto RSO2.
    Choose Datasource from bellow of Three
    a). Transaction Data
    b). Master data Attributes
    c). Master data Text
    2.Specify Application component(SD/MM..)
    3.There are three extraction methods to fill datasource.
    4.Select extraction method extracts the data from a transparent table or database view.
    5.Select Extraction from View, then we have to create the View.
    a).Specify the view name.
    b).Choose the view type (Database view) from bellow mentioned views.
    i). Database view.
    ii). Projection view.
    iii).Maintainance view.
    iv). Help view.
    6. Specify Tables and Join Conditions and define view fields.
    7. Assign View to Datasource
    8. Once you specify view in Data source, the extract structure will generate.
    9. you can check the data in RSA3.
    Regards,
    Suman

  • How to find out the user who has created  a new field in the custom table.

    How to find out the user details who has created  a new field in the custom table.
    Thanks,
    Joan

    Hi Jesudasan ,
    You can know the user details with version management.Please find the
    below procedure to know.
    Go to table->Utilities tab->version->Version management->Compare the previous one .
    Hope this solves the issue,Let me know if you have any issues.
    Thanks,
    Rajani

  • How to use the customer types in customer master data

    how to use the customer types in customer master data?
    menu path is Extras -> account group info -> customer types

    hi,
    This is an option given to you to choose (if you need to) the way you perceive this customer.Here you get options including ompetitors,Salespartner, prospect,
    default sp ,consumer.
    See it helps you to differentiate between prospect(which you may use for quotation or inquiry purpose)Sales partner and the competetor.
    I hope this clarifies your quiery.Reward points if so.
    Thanking you,
    Best regards,
    R.Srinivasan

  • How to maintain the material master data in plant

    Hi all,
    while creating BOM I am getting an error "no material master data in plant' can some one help me how to maintain the material master data in plant
    Regards,
    Balu

    Check the material available in MARC table in SE11 transaction against your plant.If it is not available please maintain through MM01 transaction.

  • How to maintained the Text  language for CKF keyfigure

    Dear All,
    Please let me know how to maintained the text language for CKF I am using only keyfigures in CKF.
    Issue is text is not showing in Spain language when user exeuted the report (longin Spain) for CKF keyfigures .
    As per report design there are formuals and direct keyfigures and CKF has defined and we keep it under in Row struture in the report.
    After exeuted the report (Login Spain)Text has converted in all languages along with spain except for CKF keyfigures.
    Issue in text CKF's:
    There is a main  CKF (Cost) under this again we defined two sub CKF's those are total cost and average cost. We able to see the text in Spain language for Main CKF(cost) and also cheked in RSZELTTXT(Texts of reporting component elements) for the same.
    We can able to see the text in all languages for main CKF(cost) and enteries are there in RSZELTTXT table.
    We can see only  the text in english for  total cost and average cost and also enteris are there only in EN in RSZELTTXT table.
    It would help to me if any one can answer my question.
    Thanks in advance .
    Regards,
    MQ

    U can fetch the texts for the items using
    Read_text.
    Example:
        g_f_tdname = xvttp-vbeln.
        g_f_obj = p_obj.
        g_f_langu = 'DE'.
        REFRESH g_t_lines.
        CLEAR g_t_lines.
        CALL FUNCTION 'READ_TEXT'
             EXPORTING
                  id                      = p_var
                  language                = g_f_langu
                  name                    = g_f_tdname
                  object                  = g_f_obj
             TABLES
                  lines                   = g_t_lines
             EXCEPTIONS
                  id                      = 1
                  language                = 2
                  name                    = 3
                  not_found               = 4
                  object                  = 5
                  reference_check         = 6
                  wrong_access_to_archive = 7
                  OTHERS                  = 8.
        IF sy-subrc <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    The Required fields are,
    Text-id ,language,name,object.
    Let me know if you further require help.
    Regards

  • How to find out the volume of the data updated in the custom table

    Hi,
    I need to find out the the volume of the data inserted or updated in the the custom table(Y tables).I have tried by the sm37.the job running in to update the table but i didnot get thde amount of the data.and if get the volume of the data which being updated in the custom table is there any option to control that amount to being updated?
    Thanks in advance .....waiting for the respone.

    Hi Sreenivas.
    How did you find the solution to this? Trying to do the same thing!
    Cheers,
    Tom

  • Validation: How to maintain the entry in GB02C

    HI FI GURUS n EXPERTS,
    My requirement is that - We want to restrict Negative posting for some GL i.e. For some GL balance should not be Zero.
    When I have made the search on SDN, I found it can be done with the help of Validation: OB28 & GGB0.
    Currently we are not using any validation. When we use T-Code GGB0 --> Financial Accounting --> Line Item --> New Validation
    System shows a pop-up window to select Boolean Class & Message ID.
    I also found that this information is maintained in Table GB02C.
    When I use Se16 to see the detail of the table GB02C, I found there is only one entry Bool. Class: FP1 & Message ID 7F.
    But I don't know How to maintain the entry in table GB02C & What is the T-Code for it. which message ID I have to create.
    Please help.
    DSC

    Dear Alex,
    When I use: GGB0 --> Financial Accounting --> Line Item --> New Validation
    System shows a pop-up window to select Boolean Class & Message Class, I select the Message Class 9 and for Message Class Press F4 and select any message class. System gives an error message: Message ID must start with 'Z' Message no. GB116.
    Basically, My question is that: Which T-Code we have to use to maintain Boolean Class & Message Class.
    With thanks,
    DSC

Maybe you are looking for