Uncompressing the Address2 field in OINV

I thought I had seen a SQL script on the portal to do this but I can't find it now.  I am trying to create a query that will give me a list of AR invoices for a specific state (WA) within a date range.
How can I extract or search for just the state portion of the Address2 field?  Using the OCRD does not work because it will return any invoice that has a shipping address state of WA.
(SELECT T0.[DocNum], T0.[DocDate], T0.[CardCode],
T0.[CardName], T0.[NumAtCard], T1.[WhsCode],
T1.[ItemCode], T1.[Dscription], T1.[Quantity],
T1.[LineTotal], T0.[Address2]
FROM OINV T0
INNER JOIN INV1 T1 ON T0.[DocEntry] = T1.[DocEntry]
INNER JOIN OCRD T2 ON T0.[CardCode] = T2.[CardCode]
WHERE T2.[State2] =[%0] AND  T0.[DocDate] >=[%1]
AND  T0.[DocDate] <=[%2])
Thank you for any help you can give me.
Jeff

Hi Jeff
I think that my conversation with Eric in this thread can shed some light on B1's behavior regarding addresses in marketing documents:
Crystal report - how to split a field into more fields
Also I believe that this article can help you with separation of different parts of an address:
Tally OH! An Improved SQL 8K “CSV Splitter” Function - SQLServerCentral
Hopefully in your database different parts are split with char(13) delimiter (or combination char(10)+char(13) I believe).
Kind regards,
Radek

Similar Messages

  • ReqDate field in OINV

    Hi Experts,
    Can anyone tell me about the ReqDate field in the Invoice table OINV. What date appears in this field? Under which circumstance does ReqDate field contain value? (ReqDate acepts NULL)
    Please help
    Thanks in Advance
    Jaics

    Dear Jane Jing,
    Thank you for the reply which is timely and informative.
    But I found these fields in my invoice table OINV. Apparently these Invoices were not copied from Sales Order or Delivery and this particular fiels is not in Invoice screen. So I was wondering as to how it got filled with vaue. Any Idea?
    Thanks in Advance
    Regards
    Jaics

  • Applied Amount field in OINV?

    Hi all,
    My colleague is putting together a report on an AR invoice.
    We can't work out which field in OINV contains data from the "Applied Amount" field in SAP.
    I've had a search around here and in the SDK help documentation (not that this is anything to do with the SDK), and I can't see an answer.
    Thanks!
    Cal.

    Hi
    Field name is    PaidSys which is storing applied amount.
    Thanks
    Mohammad Imran

  • Assign value to the DFF fields in the OA Page

    Hi,
    I have a requirement to copy customer address defined at the customer level to the contact while creating customer contact in Sales User.
    The page has the address fields like - Address1, Address2, county, state etc. when I open the page in JDev, I can't see these fields defined anywhere. But there is a region under a MessageComponentLayout region and under it one flex item, which is having a View Instance.
    This VO includes all the fields from HZ_LOCATIONS table. But on the page only few fields are visible.
    Can anyone tell me how I can assign the customer address to these DFFs that are visible on the Page.
    Thanks.

    Hi,
    The Address section is rendered using the Address DFF of the Receivables applications. Hope you know the navigation to see the details of the DFF.
    I think the ASN is also using the same, by extending the AR region, /oracle/apps/ar/hz/components/address/webui/HzPuiAddressCreateUpdate.
    What you have to do is, in order to get complete handle to this address section, you have to do the controller extension. That is, write a new controller which extends oracle.apps.ar.hz.components.address.webui.HzPuiAddressCreateUpdateCO class. Using the personalization, set your custom controller class to the region /oracle/apps/ar/hz/components/address/webui/HzPuiAddressCreateUpdate.
    Here is the sample code.
    * Procedure to handle Address1 Field.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void handleAddress1Field(OAPageContext pageContext, OAWebBean webBean, String calledFrom)
    OADescriptiveFlexBean flexBean = (OADescriptiveFlexBean)webBean.findChildRecursive("HzAddressStyleFlex");
    if(flexBean!=null)
    DescriptiveFlexfield descriptFlex = (DescriptiveFlexfield)flexBean.getAttributeValue(FLEXFIELD_REFERENCE);
    if(descriptFlex!=null)
    try
    Segment address1Segment = descriptFlex.getSegment(1);
              address1Segment.setValue("TO_BE_REPLACED");
              OAApplicationModuleImpl applicationModule = (OAApplicationModuleImpl)pageContext.getApplicationModule(webBean);
              OAViewObjectImpl locationVO = (OAViewObjectImpl)applicationModule.findViewObject("HzPuiLocationVO");
              OAViewRowImpl locationRow = (OAViewRowImpl)locationVO.getCurrentRow();
              if(locationRow!=null)
                   locationRow.setAttribute("Address1", valueBuffer.toString());
                   OAEntityImpl locationEO = (OAEntityImpl)locationRow.getEntity(0);
                   locationEO.setAttribute("Address1", valueBuffer.toString());
    }catch(FlexException flexException)
                   throw new OAException(flexException.toString());
    Use this code as reference and modify this based on your requirement. Thanks

  • What are the mandatory fields while creation of material master in differen

    what are the mandatory fields while creation of material master in different views?

    Hi Gopi,
      This is purely depends on the function configuration, which would be done MM consultants.  Kindly check with them.
    thanks & regards
    Kishore Kumar Maram

  • Standart GR/IR report with the following fields?

    Hi All,
    Transaction FBL3N gives a list of open GR/IR items at a keydate. However, I'm looking for the following fields to appear in the output
    Purchasing doc#, line item, Vendor number, vendor name, Material, Quantity, Accounting document no., Document date and Amount.
    I've tried adding certain fields using the Layout option but still havent got all these fields together. Is there any standard SAP report which would give me this output or would I need to develop a custom report?
    I also tried ABAP query but there;s no link between an accounting document and Purchase order apart from the "Assignment" field in the BSEG table which has purchase orderno. and line item combined into a single text field.
    Thanks
    Tejas

    Hi
    There is no specific standard report for getting the details required by you.
    In FBL3N you will get only the FI vendor line items but all the details required by you is not possible.
    BUT you can go for the ABAP Report.
    TABLES: RSEG,EKKO, EKPO, EKBE, BSAK
    Use the "Object key"  = (MM invoice number along with fiscal year it comes10+4 is length of the field take the invoice number use the same in RSEG and you will get the the PO details and material details)field in the BSAK for linking both the BSAK and RSEG
    VVR

  • How do I print just 1 web page in FF 29 ? With 29 you can only change the first field ( 1 of 5, 2 of 5, 3 of 5, etc. ) That means I can only print all 5 pages,

    So I cant seem to print just the 1st of 5 pages. The default setting , 1 of 5, will print all 5 pages. The 2nd field can not be altered, as it could in previous FF versions, to 1 of 1. Therefore, I can only print all 5 pages, 2 through 5, 3 through 5, etc. WTF - I keep wasting print paper. I got the print edit add-on but that doesn't seem to help. I have been through several FF versions and do not like the format of 29.

    Actually, with the [https://addons.mozilla.org/en-US/firefox/addon/print-edit/ Print Edit addon], if I click the down arrow I get the old print format options and can do it.

  • Custom exit or badi for changing the user fields in operation of process order

    Hi all
        I want to find a exit or badi to set default value to the user fields in operation of process order when COR1.
        I have tried exit 'PPCO0001', but this exit is call after commit work, so I can not change any thing
        I also tried to use badi 'workorder_update', 'before_update', but all parameters in this BADI are importing, can't be changed, I've tried to change it and then program dump.
        Do you have any solution for this question?
    Thanks

    Do a Implicit Enhancement at the PBO of this subscreen.

  • What are all the mandatory fields of the BAPI_PO_GETDETAIL?

    Hi friends,
    I am new to XI. I am using the "BAPI_PO_GETDETAIL1" in my scenario to get details of a particular Purchase Order. Can you tell me the mandatory fields of this BAPI?
    Where should i look to identify the mandatory fields of a BAPI?
    Thanks.
    Senthil Nathan.

    Hi you can see this in SE37 under the Import Tab. Here you see that the only mandatory input field is PURCHASEORDER. So if you provide the purchaseorder number you get alle the details for that.
    Kind regards
    Mikkel

  • What are the Mandatory fields????

    Hi.... Experts...
       Please spend your valueble time for me.... I can get back to you with 10 points....
    Here I got a requirement to create contract with VA41 transaction...
    But I am in confusion with feilds which should be must record...
    Please guide me on mandatory fields of VA41 transaction....
    Thanks,
    Naveen.I

    Hi,
    When ever you want to know the required fields for any transaction just try to run the Transaction In SHDB in forgroud mode with a recording name.
    You will easily get to know the required fields to be entered for a given transaction.
    Sometimes when we run this VA41, eventhough some fields are not mandatory we dont pass them but we willnt b able to create the document eventhough some fields are not mandatory to fill> To have the clear idea abt the manadotry fields try to run in SHDB.
    for this VA41, ther mandatory fields are-
    contract type (VBAK-AUART)
    Sales Area is a combintaiotn of SAles Org, SAles divnsion, Distirbution channel hende all 3 are required to be filled.
    1st screen-
    Sales Area(VBAK-VKORG)
    Division(VBAK-SPART)
    D.Channel(VBAK-VTWEG),
    2nd screen-
    Customer code(kunnr),
    Contract validity,
    material code(matnr),
    quantity
    plant(werks).
    Best Wishes,
    Chandralekha
    Edited by: Craig Cmehil on Jun 30, 2008 11:24 AM

  • What are the Mandatory Fields in Transaction ME51

    Hello Seniors,
    I have a requirement about purchase order creation. In this process, I am using the BAPI named   " BAPI_PO_CREATE1 ". I have passed all the fields but when I debug and look into the internal tables, I couldn't find certain records. I even debugged " bapiret2"  and I see an error which reads "" All mandatory fields are missing"". I have even created a PO  in ME51 and found out the mandatory fields but in vain. BAPIRET2 still says, there are some more mandatory fields missing. I need to know what are all the mandatory fields to create a Purchase order using TCODE - ME51.
    Your reply is most awaited and rewarded.
    Thanks and Regards,
    MARKIV

    hi ,
    Functionality
    Function module BAPI_PO_CREATE1 enables you to create purchase orders. The BAPI uses the technology behind the Enjoy purchase order transaction ( ME21N).
    Alternatively, the IDoc type PORDCR1 is available. The data from this IDoc automatically populates the interface parameters of the function module BAPI_PO_CREATE1.
    Functionality in Detail
    Authorization
    The following authorization objects are checked when an Enjoy purchase order is created (activity 01):
    M_BEST_BSA (document type in PO)
    M_BEST_EKG (purchasing group in PO)
    M_BEST_EKO (purchasing organization in PO)
    M_BEST_WRK (plant in PO)
    Controlling adoption of field values via X bar
    For most tables, you can determine via your own parameters in the associated X bar in each case (e.g. PoItemX) whether fields are to be set initial, values inserted via the interface, or default values adopted (e.g. from Customizing or master records) (for example, it is not mandatory to adopt the material group from an underlying purchase requisition - you can change it with the BAPI).
    Transfer
    Header data
    The header data of the Enjoy purchase order is transferred in the table PoHeader.
    Item data
    The item data of the Enjoy purchase order is stored in the table PoItem (general item data). The delivery schedule lines are stored in the table PoSchedule.
    Use the table PoAccount to specify the account assignment information. If account assignments have been specified for services and limits, you show the relevant account assignment line in PoAccount in the table PoSrvAccessValues via the package number of the service or the limit.
    Services and limits
    Services, free limits and limits with contract reference can be specified in the tables PoServices, PoLimits, and PoContractLimits.
    Conditions
    Conditions are transferred in the table PoCond; header conditions in the table PoCondHeader. Price determination is reinitiated via the parameter CALCTYPE in the table PoItem.
    Vendor and delivery address
    The vendor's address can be specified individually in the table PoAddrVendor; the delivery address in the table PoAddrDelivery. If you do not make any individual specification, the fields will be populated via the central address managementfacility.
    Note
    In this method, the following restrictions apply with regard to addresses:
    Addresses can only be created with this method - they cannot be changed. You can only change address data with the method BAPI_ADDRESSORG_CHANGE.
    When you create addresses, they are not checked by the method. An Enjoy purchase order may therefore contain faulty address data.
    Partner roles
    The partners can be maintained individually via the table PoPartner (with the exception of the partner role "vendor").
    Import/export data
    Import/Export data can be specified per item in the table PoExpImpItem. Foreign trade data can only be transferred as default data for new items.
    Texts
    Header and item texts can be transferred in the tables PoTextHeader and PoTextItem. Texts for services are imported in the table PoServicesText.
    Version Management
    You can make use of the Version Management facility via the table AllVersions.
    Return
    The PO number is returned in the parameter ExpPurchaseOrder. In addition, all information except the service and export/import tables is placed in the output structures.
    Return messages
    Messages are returned in the parameter Return. This also contains information as to whether interface data has been wrongly or probably wrongly (heuristical interface check) populated. If a PO has been successfully created, the PO number is also placed in the return table with the appropriate message.
    Example
    Example of population of BAPI interface in the Function Builder
    Parameter: POHEADER
    COMP_CODE = 1000
    DOC_TYPE = NB
    ITEM_INTVL = 00001
    VENDOR = 0000001000
    PMNTTRMS = 0001
    PURCH_ORG = 1000
    PUR_GROUP = 001
    CURRENCY = EUR
    Parameter: POHEADERX
    COMP_CODE = X
    DOC_TYPE = X
    ITEM_INTVL = X
    VENDOR = X
    PMNTTRMS = X
    PURCH_ORG = X
    PUR_GROUP = X
    Parameter: POITEM
    PO_ITEM = 00001
    MATERIAL = 100-100
    PLANT = 1000
    STGE_LOC = 0001
    QUANTITY = 15.000
    TAX_CODE = V0
    ITEM_CAT = 0
    ACCTASSCAT = K
    Parameter: POITEMX
    PO_ITEM = 00001
    MATERIAL = X
    PLANT = X
    STGE_LOC = X
    QUANTITY = X
    TAX_CODE = X
    ITEM_CAT = X
    ACCTASSCAT = X
    Parameter: POSCHEDULE
    PO_ITEM = 00001
    SCHED_LINE = 0001
    DELIVERY_DATE = 02.12.2002
    QUANTITY = 6.000
    PO_ITEM = 00001
    SCHED_LINE = 0002
    DELIVERY_DATE = 03.12.2002
    QUANTITY = 5.000
    PO_ITEM = 00001
    SCHED_LINE = 0003
    DELIVERY_DATE = 04.12.2002
    QUANTITY = 4.000
    Parameter: POSCHEDULEX
    PO_ITEM = 00001
    SCHED_LINE = 0001
    PO_ITEMX = X
    SCHED_LINEX = X
    DELIVERY_DATE = X
    QUANTITY = X
    PO_ITEM = 00001
    SCHED_LINE = 0002
    PO_ITEMX = X
    SCHED_LINEX = X
    DELIVERY_DATE = X
    QUANTITY = X
    PO_ITEM = 00001
    SCHED_LINE = 0003
    PO_ITEMX = X
    SCHED_LINEX = X
    DELIVERY_DATE = X
    QUANTITY = X
    Parameter: POACCOUNT
    PO_ITEM = 00001
    SERIAL_NO = 01
    QUANTITY = 15.000
    GL_ACCOUNT = 0000400000
    COSTCENTER = 0000001000
    CO_AREA = 1000
    Parameter: POACCOUNTX
    PO_ITEM = 00001
    SERIAL_NO = 01
    QUANTITY = X
    GL_ACCOUNT = X
    COSTCENTER = X
    CO_AREA = X
    Parameter: POCOND
    ITM_NUMBER = 000001
    COND_ST_NO = 001
    COND_TYPE = PB00
    COND_VALUE = 79.900000000
    CURRENCY = EUR
    CURRENCY_ISO = EUR
    COND_UNIT = KG
    COND_P_UNT = 1
    CHANGE_ID = U
    Parameter: POCONDX
    ITM_NUMBER =  000001
    COND_ST_NO =  000
    ITM_NUMBERX =  X
    COND_TYPE =  X
    COND_VALUE =  X
    CURRENCY =  X
    CHANGE_ID =  X
    Parameter: POPARTNER
    PARTNERDESC =  OA
    LANGU =  EN
    BUSPARTNO =  0000001100
    PARTNERDESC =  GS
    LANGU =  EN
    BUSPARTNO =  0000001200
    PARTNERDESC =  PI
    LANGU =  EN
    BUSPARTNO =  0000001000
    Help in the Case of Problems
    1. Note 197958 lists answers to frequently asked questions (FAQs). (Note 499626 contains answers to FAQs relating to External Services Management.)
    2. If you have detected an error in the function of a BAPI, kindly create a reproducible example in the test data directory in the Function Builder (transaction code SE37). Note 375886 tells you how to do this.
    3. If the problem persists, please create a Customer Problem Message for the componente MM-PUR-PO-BAPI, and document the reproducible example where necessary.
    Customer Enhancements
    The following user exits (function modules) are available for the BAPI BAPI_PO_CREATE1:
    EXIT_SAPL2012_001 (at start of BAPI)
    EXIT_SAPL2012_003 (at end of BAPI)
    The following user exits (function modules) are available for the BAPI BAPI BAPI_PO_CHANGE:
    EXIT_SAPL2012_002 (at start of BAPI)
    EXIT_SAPL2012_004 (at end of BAPI)
    These exits belong to the enhancement SAPL2012 (see also transaction codes SMOD and CMOD).
    There is also the option of populating customer-specific fields for header, item, or account assignment data via the parameter EXTENSIONIN.
    Further information
    1. Note 197958 contains up-to-date information on the purchase order BAPIs.
    2. If you test the BAPIs BAPI_PO_CREATE1 or BAPI_PO_CHANGE in the Function Builder (transaction code SE37), no database updates will be carried out. If you need this function, please take a look at Note 420646.
    3. The BAPI BAPI_PO_GETDETAIL serves to read the details of a purchase order. The BAPI cannot read all details (e.g. conditions). However, you can use the BAPI BAPI_PO_CHANGE for this purpose if only the document number is populated and the initiator has change authorizations for purchase orders.
    4. Frequently used BAPIs for purchase orders are BAPI_PO_CREATE, BAPI_PO_CREATE1, BAPI_PO_CHANGE, BAPI_PO_GETDETAIL, BAPI_PO_GETITEMS, BAPI_PO_GETITEMSREL, and BAPI_PO_GETRELINFO.
    5. For more information on purchase orders, refer to the SAP library (under MM Purchasing -> Purchase Orders) or the Help for the Enjoy Purchase Order, or choose the path Tools -> ABAP Workbench -> Overview -> BAPI Explorer from the SAP menu.
    regards
    reena

  • How to populate the new field of R/3 in BW

    Hi,
    There was a requirement to modify the sap screen in the R/3.
    For the same a new field is created which populate the data via a table in R/3.
    Now I have to populate the same field in BW. I am working on 3.5 Version.
    In R/3 I have a data source and I am not able to see the same available in the data source
    The field is available in the extract structure but I am unable to populate the same in the data source.
    Kindly help.

    The Data Source is picked from the FM.
    Also,my requirement is to display the text values for the new field
    I am going to create a Generic Master Data which will fetch the data from the table which has fields (Code, Langu and the text) and replicate the same to BW.
    Now to populate the code in BW, I need to have the field in the data source and from there I can add the same code field in the bw comm/tran/etc...
    The code is available in the Extraction and not in the data source.
    At the reporting level I will extract the report based on key and text.
    I tried using ROOSFIELD to populate the field in the datasource, but I am not able to do the same.

  • Unable to capture the screen field in badi

    Dear Experts,
    I have my requirement something like this.
    The t code which we are using is cj20n.
    I need to capture the date fields whcih are in  2 tab and when i press save these fields needs to be captured and validations are to be  done accordingly.
    I have found the badi name as WORKBREAKDOWN_UPDATE and when i put some break point this method trigeers but only few fields are only captured except the second tab values ( i mean date fields ).
    SO please suggest me with a solution as wht needs to be done in my case.
    Regards,
    Madhavi.

    try using import or export parameter id .

  • Send email from workflow using a variable in the to field in SharePoint Online (Office 365)

    I have a simple sharepoint workflow that sends and email to users.  I know that the mail portion works because I can put a user's email address in the to: field and it sends fine.  If I use a string variable with the email address, I get a workflow
    error.
    Simple steps to repro for me:
    Create a new workflow in SPD  (I have tried a list workflow and site workflow)
    Create a workflow variable named email.
    Set the variable to an email address where the user is in the site
    Send email and do a variable lookup to the email variable just set.
    The workflow just hangs in this scenario
    I do get an error:
    Retrying last request. Next attempt scheduled in less than one minute. Details of last request: HTTP BadRequest to https://[tenant].sharepoint.com/_api/sp.utilities.utility.SendEmail
    Correlation Id: 568e9c68-ea75-d057-ab9f-d86f6cae3021 Instance Id: 9cc721a4-78e6-456f-812b-67351dfc9710
    The e-mail message cannot be sent. Make sure the e-mail has a valid recipient.
    Retry now

    Simple answer... When I used the variable, I marked it as a string.  There is an email address setting.

  • Who has changed the Custom Field value?

    Dears,
    Need to know the information regarding how to fetch that who has changed the Custom field value from PWA/MPP.
    Example:
    There is a PDP (say ProjectInfo):
    There is a Custom Field added to that PDP (say Project Status = In Progress).
    Now for ProjectA, someone has checked out and changed the Custom Field "Project Status" from "In Progress" to "Closed".
    I need to fetch the information regarding who has changed that Custom field.
    In which direction should I move: Event Handlers, PSI???? Any other stuff?
    Thanks & Regards,
    Shravan

    Hi Shravan,
    I'm not a developer but I do know that you can use an event handler pushing the resource name and date in custom fields.
    Another way is to use a 3rd-party tool like
    FluentPro Audit Tool.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

Maybe you are looking for