Problem with a mandatory field

Hello Experts, Iu2019m trying to make mandatory the u201CNumAtACardu201D field in the u201CA/P invoinceu201D I´m using this code but it doesnu2019t work
If @transaction_type = 'A' AND @Object_type = '18'
begin
if exists (SELECT T0.docnum FROM dbo.OPCH T0
WHERE T0.NumAtCard is null and T0.DOCENTRY = @list_of_cols_val_tab_del)
select @Error = 1, @error_message = 'Enter Vendor Ref. Number'
end
Hope you can help
Thanks.

Hi
I just copied from forum and paste it on my sp_transaction .All I delete was no 1,2,....
I didn't receive any error . 
If @transaction_type = 'A' AND @Object_type = '18'
begin
if (SELECT T0.NumAtCard FROM dbo.OPCH T0
where T0.DOCENTRY = @list_of_cols_val_tab_del) is null
Begin
select @Error = 1, @error_message = 'Enter Vendor Ref. Number'
end
End
Can you try one more time
Thank you
Bishal

Similar Messages

  • Problem with a Dynpro field (type numc)

    hi everybody.
    I'm developping a ModulPool application in wich i have 2 RadioButtons with 2 textbox fields.
    What i pretend to do is, when the user clicks a radiobutton and strikes Intro, enable the corresponding textbox field and disable the other one.
    My code runs fine, but i have a little problem. When I loop the screen table, to set the appropiate value to the 'input' property, in this case, when i try to disable it (input = '0'), I get a zero character in that field. This field has NUMC type, i'm sure this is the problem
    'cos i've got no problem with the other field (type char). But i can't solve it.
    Anybody's got an idea?
    Thanks

    What you are seeing is the normal behavior of a numeric field represented by the SAPgui.  This is how all numeric fields are displayed via SAPgui.  If you don't want to see the 0,  then you just change the field type to CHAR and handle accordingly.
    Regards,
    Rich Heilman

  • Problem with the quantity field

    hi every one
    i am facing a problem with the quantity field (vbap-kwmeng)
    as per my requirement i need to display this quantity field along with some other item fields from VBAP in an alv grid.
    among all the fields displayed in the alv grid only this quantity field is editable(end user can change this quantity)
    once end user changes this quantity and press save button i need to capture this new quantity in my internaltable.
    problem is input of length of quantity is 15 and the output length is 19
    so when i am pressing save
    say my quantity is 50 when i am pressing save '0.050' is coming because of the length difference
    how can i capture the original changed value.
    vamsi

    what about define two fields in  you inner table ,one as char and the other as vbap-kwmeng, you can show the char one in the ALV gird , when user input value and press SAVE ,you can move the value to vbap-kwmeng.
    you can test it,mybe some one has one better idea.

  • Problem with adding new field to the mass change screen in FBL5N

    Hi,
    We have a problem with adding the field XREF3 to the mass change screen. We followed steps described in the SAP Note 640908, but the result is that when we try to mass change some documents in FBL5N and enter some values in the mass change screen, a message appears: "Please enter at least one new value" and nothing is changed.
    If you have faced with such a problem, we would be grateful if you give us some tips.
    Regards,
    Miłosz Włodarczyk

    The problem has been resolved: we didn't activate a code in SE80.

  • Strange problem while checking Mandatory fields

    Hi ,
    I am checking mandatory fields with the method following method.
    CL_WD_DYNAMIC_TOOL=>CHECK_MANDATORY_ATTR_ON_VIEW( VIEW_CONTROLLER = my_controller ).
    It was working fine for mandatory fields and also showing one extra input field which is not mandatory with red border .
    Please tell me how to avoid this and What could be the problem.
    Thanks and Best Regards,
    Vijay

    Hi Vijay,
                the extra vield thats showing in re d will be a field that doesnt support blank entry. try commenting the method thats calling CL_WD_DYNAMIC_TOOL.
                CL_WD_DYNAMIC_TOOL=>CHECK_MANDATORY_ATTR_ON_VIEW will check only mandatory fields.. thats for sure.
       the error message thats showing on the optional fild is coming from some standard check
    Regards
    Sarath

  • Contract - problem with attachements (empty field in LOIO_OBJID)

    Hi Guys,
    We are using extended classic scenario of SRM 4.0 (SRM Server 500) and our latest support package is SAPKIBKS12. We have the following problem with contracts.
    Sometimes when an attachment is added to a contract the system does not fill the following fields in tabel BBP_PDATT.
    LOIO_CLASS: Normally filled with BBP_L_DOC
    LOIO_OBJID: Normaly filled with a GUID size datastring
    Whenever this happens and later on the contract is changed and released the system will raise an abort. We tried the following notes but no good result.
    891293,919467,932602,964065. Some other notes that might be possible are 1042826/1085700/1083063 but we also don't have good experience with these ones.
    Can anyone give us advice about two things.
    1) Is there a way to fill the empty fields in BBP_PDATT so that existing contract will work properly again?
    2) Does anyone know why this problem occurs and how to fix it for new contracts?
    Hope to hear from you,
    Arie

    Thankyou for the reply. I have made following changes but still not working. I am creating the inquiry and customer material is not getting populated. Please guide in resolving the issue.
    DATA : W_ENQUIRY_ITEM_INX LIKE BAPISDITMX OCCURS 0 WITH HEADER LINE.
    W_ENQUIRY_ITEM_INX-ITM_NUMBER  = THEAD-ITEMNO.
          W_ENQUIRY_ITEM_INX-UPDATEFLAG  = 'X'.
          W_ENQUIRY_ITEM_INX-CUST_MAT22 = 'X'.
    APPEND W_ENQUIRY_ITEM_INX.
    CALL FUNCTION 'BAPI_INQUIRY_CREATEFROMDATA2'
       EXPORTING
       SALESDOCUMENTIN               =
         INQUIRY_HEADER_IN             =  W_ENQUIRY_THEAD
      IMPORTING
        SALESDOCUMENT                 = W_NUMBER
       TABLES
        RETURN                        = W_RETURN
        INQUIRY_ITEMS_IN              =  W_ENQUIRY_ITEM
        INQUIRY_ITEMS_INX             =  W_ENQUIRY_ITEM_INX
         INQUIRY_PARTNERS              = T_INQUIRY_PARTNERS

  • Problem with non currency field calculations to become curr

    Hi guys,
    Is there a problem if I have a QUAN field and DEC field forming to become a CURR field? I mean a have this computation below:
    v_var1 = v_var2 * v_var3.
    where v_var1 type QUAN, v_var2 type DEC and v_var3 type CURR...
    would it incur any problem with the calculations?
    Thanks!

    Hi,
    Did you try ?
    Worked for me flawlessly
    tables bseg.
    parameters : qty like bseg-menge,
                       amt like bseg-dmbtr.
    data : result like bseg-dmbtr.
    result = qty * amt.
                write result.
    The only issue is that the result will be rounded upto 2 decimals.
    But if you declare result as
    data : result(13) type p decimals 3.
    Then there will be no issues.
    regards,
    Advait
    Edited by: Advait Gode on Oct 3, 2008 3:59 PM

  • Problems with the 'Comments' field in iTunes

    First, sorry for my english (I'm danish).
    I've read a lot of threads here and everywhere else, but can't find a solution for my exact problem. I use Windows Vista and the newest version of iTunes.
    Most of my mp3 songs (35.000) are put directly in album folders to the folder 'D:My Music from another computer via a USB drive and the songs already have id3 tag information on them.
    I then add the albums to iTunes and most of my tag information is now updated in iTunes. Names, Artists, Genre, Year, everything is okay. By the way the songs have ID3v2.3 tag information. I see that in my Mp3tag v.2.42 application.
    But the problem is with the 'Comments' field:
    Those tags (originally put to the songs directly in the proberties of the song in Windows Explorer) will simply not transfer to iTunes 'Comments' field. And if I write something in the iTunes 'Comments' field this will not show up in the fields properties in windows Explorer. It looks like the 'Comments' fields in iTunes and in the proberties in the song are not connected at all!?
    I then found out, I could let iTunes convert the ID3 codes, but nothing happens except from when using v. 1.0 or 1.1, because then the comments tag are transferres, but unfortunately all the tags will only show 30 characters!!!
    And there's also a different story:
    A few albums though are put directly on my computer by using iTunes to import the CD. These songs have ID3 v.2.2 tags, so I guess iTunes import files in that format?
    And here it's a little different story. If I put comment data directly to the file proberties in Windows Explorer (after the CD's been imported to iTunes), the comments will show up in iTunes, but only as several 0 and 1 digits! On the other hand, if I put information directly in iTunes 'Comments' field it wil show up correctly in the file proberties! But it's only a few songs/albums that are handled that way.
    Well, bottom's line, I want to see my comments tags (which are allready there in the song's proberties) when I browse my music in my folders in Windows Explorer and I want to see the exact same comments if I go to browse my music in iTunes. That should not be a problem ... but it is not ...
    Can I please get a solution or at least an explanation, and hopefully in not too tecnical terms.

    I, too, hope someone will answer this! I am hoping to catalog my entire CD collection in iTunes and I want to include the storage box number somehow, thinking that "comments" would be a good place to do so. If I cannot do that I'll try to find a program other than iTumes to do it. Does anyone have any suggestions on this topic? ...perhaps I need to open a new thread?
    THANKS!
    Doug

  • Problem with Update Text fields in Infoset

    Hi experts,
    Here i would like to rephrase the question. Normaly while working with Infosets, when press "update text fields" button, those fields having text is updated. But one of my field is not updated. I need some help from you for that.
    One more question i've that my field is having check table so i would like to know how exactly the text field is updated.
    scenario.
    Customized IT9320 has field prt_pos added. This field is having check table T528B. But i want text field to be attached is IT1000-STEXT.
    How this can be done, because i suspect that just using check table field IT1000-STEXT is not attached to IT9320-prt_pos.
    Please help. I'm really got stuck here.
    Thanks a lot,
    Toral.
    Hi,
    I'm working on customised Infotype. I need to add one new customised field ie Present Position. This field has number as well as text associated with it. There is a check table attached with this field so that text can be displayed alongwith number.
    I need this field in SAP/Adhoc query. But when i go to SQ02 this fields shows only value. Text is disabled for this field. I'm not sure why is it so.
    I looked into other infotype which as one field using same data element, and that field shows both value as well as text. Please help me to rectify this issue for present position field.
    Thanks,
    Toral.
    Edited by: Toral Sheth on Jul 4, 2008 2:01 PM

    You would be much better off with one multi-line form field.
    There are many problems with trying to determine when one is at the end of the display field with text entry.

  • Problem with long text field.

    Hi all,
    I have a problem when I try to concatenate two fields.
    It seems the new field only is 254 characters long?
    Here is my syntax:
    data: w_long_text(1000).
    clear w_long_text.
        loop at iline.
          concatenate w_long_text iline-tdline into w_long_text separated by space.
        endloop.
    I'm sure the text is longer then 254 becuase I can see the text in an Activity in the Sap Crm system.
    Best Regards
    Frode

    Hi thomas
    wat i would suggest you is better take an internal table with long_text(255) field .
    data : begin of it_text occurs 0,
                long_text(255),
              end of it_text.
    clear : w_long_text,it_text.
    loop at iline.
    concatenate w_long_text iline-tdline into w_long_text separated by space.
    <b>it_text-long_text = iline-tdline.</b>
    append it_text.
    clear it_text.
    endloop.
    and when displaying the text keep that in a loop and print it.
    This way u can display the whole text irrespective of the char length.
    Reward points if helpful
    Regards
    Zarina

  • Problem with select max(FIELD)

    I have a table with the following fields:
    PARTID     ART_TYP     AEC     SERVICE     PLANT     STATUS
    4711     A     A     2     P     230
    4711     A     B     0     P     230
    4712     A     B     2     P     230
    4713     A     B     0     P     230
    I need a sqlscript where I get the records with MAX(SERVICE)
    In this example
    4711     A     A     2     P     230
    4712     A     B     2     P     230
    4713     A     B     0     P     230
    I tried this with:
    select distinct partid,
         art_typ,
         aec,
         max(service),
         plant,
         status
    from t_msltmp
    group by partid,art_typ,aec,plant,status
    But I get both records of partid=4711
    Can someone help me with this problem
    kind regards
    Menk Slot

    ROW_NUMBER() requires explicit ORDER BY clause in OVER:
    http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/functions105a.htm#86312
    SQL> select partid, art_typ, aec, mx, plant, status
      2  from(select partid,
      3                art_typ,
      4                aec,
      5                max(service) over (partition by partid) mx,
      6                row_number() over (partition by partid order by service desc) rn
      7                plant,
      8                status
      9         from t_t)
    10  where rn = 1
    11  /
        PARTID A A         MX P     STATUS
          4711 A A          2 P        230
          4712 A B          2 P        230
          4713 A B          0 P        230Rgds.
    P.S.
    Another way to get this (more tedoius):
    SQL> select partid,
      2  max(art_typ) keep (dense_rank first order by service desc) art_typ,
      3  max(aec) keep (dense_rank first order by service desc) aec,
      4  max(service) service,
      5  max(plant) keep (dense_rank first order by service desc) plant,
      6  max(status) keep (dense_rank first order by service desc) status
      7  from t_t
      8  group by partid
      9  /
        PARTID A A    SERVICE P     STATUS
          4711 A A          2 P        230
          4712 A B          2 P        230
          4713 A B          0 P        230Message was edited by:
    dnikiforov

  • Problem with SAPbouiCOM.EditText field

    Hey Everyone,
    I am experiencing a problem with an edit text box on a form that I created. For some reason when I go into the add mode on the form and type into the field the text disappears as soon as I go to another one of the controls on the form.
    If i leave the cursor in that text box the text stays. Has anyone experienced this problem before?
    Thanks in advance.

    Laura,
    I had this problem and the reason was about the datasource.
    If you item is linked to a UserDataSource, there is no problem.
    If you item is linked to a dbdatasource, you have to ensure the datasource contains at least one record.
    Can you show us the part of xml file, or VB code that you use to create your item on you form.
    the event that you can catch would be et_validate. But I think it's fired when your text box is linked to datasource
    HTH
    Sebastien

  • Problem in Matix Mandatory Field

    Hi,
    I am setting a mandatory field in matrix. All the columns are working well but for the column which holds the numeric value is accepting the value in the text eventhough i check it.
    The code follows which i used
    Try
                            Dim k As Integer
                            Dim oEdit4 As SAPbouiCOM.EditText
                            If oMatrix.RowCount() = 0 Then
                                BubbleEvent = False
                                SBO_Application.SetStatusBarMessage("LLS should not be left blank")
                            Else
                                For k = 1 To oMatrix.RowCount()
                                    'oMatrix = oForm.Items.Item("mat1").Specific
                                    oEdit4 = oMatrix.Columns.Item("txttollm").Cells.Item(k).Specific
                                    If oEdit4.String = "" And oEdit4.String = "0.000" Then
                                        BubbleEvent = False
                                        oEdit4.Active = True
                                        SBO_Application.SetStatusBarMessage("LLS should not be left blank")
                                    End If
                                Next k
                            End If
                        Catch ex As Exception
                        End Try
    In matrix for this field i set as numeric(19,6) so it displays "0.000" in matrix this is the problem so its accepting the same value. Plz give me a solution.
    Madhavi

    If oEdit4.String = "" And oEdit4.String = "0.000" Then
    shouldn't it be 'Or' condition? just check it that way.
    Binita

  • Question of possible problem with "display as" field in MS Outlook contact

    Are you aware of any problems with an apparent shift of the display as field in MS Outlook contacts after the initial syncing with their iPhone? When preparing to send an e-mail in Outlook, the auto populating of the "display as" field is now linked to incorrect contacts. Therefore, one could unknowingly send an e-mail to the wrong recipient. After seeing this error, it appears that many of my "display as" fields have shifted among contacts within my Outlook contacts. This appears to have happened right around the first time I synced my iPhone. It could be completely unrelated to the iPhone syncing but I am curious if other iPhone / MS Outlook users have experienced similar problems.

    There should be no leeway or movement. Return the phone to where you bought it and show them. It should be covered under warranty unless they determine it was dropped or accidental damage.

  • Saving Notifications with blank Mandatory Fields

    Dear Experts,
    I have an observation.
    The tabs 10\TAB02 and 10\TAB06 of a notification are having mandatory fields.
    Saving of this notification is refused without filling the mandatory fileds of tab 10\TAB02, but the same thing is not happening with the other tab namely 10\TAB06. (This notification is saving without filling the mandatory fields of this tab).
    How to avoid this?
    Regards
    Jogeswara Rao

    10\TAB01     Notification 1     Header Info
    10\TAB02     Additional data 1     Equipment/Material
    10\TAB06     Location                                            
    10\TAB10     Item     Catalogs & Codes
    10\TAB11     Tasks     Tasks
    10\TAB17     Additional data 4     Additional Data
    20\TAB01     Item overview     Object Part & Damage
    20\TAB02     Item causes     Causes
    20\TAB03     Item tasks     Tasks
    20\TAB04     Item activities     Activities
    This is the set-up.
    -Jogeswara Rao
    Edited by: K Jogeswara Rao on Jul 16, 2010 7:21 AM

Maybe you are looking for

  • I am trying to open my IPHOTO.

    everytime I try and open Iphoto after update it tells me to use upgrader for Iphoto 11 when I do this it still will not allow me to open the program I have used the upgrader and restarted the computer. It was working fine before I installed new updat

  • Problem in the jvm running in OS2 operating system

    Friends, It's a very urgent need for me. Please help me to solve this problem. I have a client server architecture based on RMI. The server runs in windows(jdk 1.4.2) and the client runs in OS2 (jdk 1.1.8). (we have no other choice but to use this jv

  • Error Accessing an Oracle Function

    Hi There, I am trying to access an oracle function and getting an error. CREATE OR REPLACE FUNCTION simple RETURN VARCHAR2 IS BEGIN RETURN 'Simple Function'; END simple; <cfstoredproc procedure="simple" datasource="MySource" returnCode ="no"> <CFPROC

  • Troubles with Mac Wireless connection from a PC

    Okay, I'm a novice with proper technical terms, but I'll try and describe the problem best I can. Here's what we have: Mac desktop computer, hooked up to the internet. That Mac desktop has wireless, and is able to transfer that internet connection to

  • Equipments to be calibrated

    Dear Experts, My client wants its equipment to be calibrated in house. In equipment we have tab (specification) under which range and other parameter to be captured is configured through class. Now I have created order for that particular equipment.