ABAP and variable data definition

May not make sense ... but I'm trying to write code like this
if X
field-symbols: <ls_screenline> type Z
endif
if Y
field-symbols: <ls_screenline> type Y
endif
So basically I can create a field-symbol <ls_screenline> that has a different structure depending on a condition.
Background: I'm in a BSP application that passes in a table structure of ANY type. This table has lines that are either structure Z or Y. Structure Z and Y mostly have the same structure and field names. In the code I'm writing I'm only accessing the fields that are common to Z and Y. So it seems silly to write my code twice, once for Z and once for Y.

assign component 'EXTERNAL_ID' of structure <ls_screenline_any> to <lv_cgpl_extid>.
Full code
CRMT_BSP_MKTPL_ TREE / BASIC DATA / BASIC_DATA_TPM
Data: lv_text1 type cgpl_text1.
field-symbols: <ls_screenLine_any> type any ,
<lv_cgpl_extid> type CGPL_EXTID,
<lv_cgpl_text1> type cgpl_text1.
if iv_screen_structure_name = 'CRMT_BSP_MKTPL_TREE' or
iv_screen_structure_name = 'CRMT_BSP_MKTPL_BASIC_DATA' OR
iv_screen_structure_name = 'CRMT_BSP_MKTPL_BASIC_DATA_TPM'.
assign et_screen_structure to <et_screen_structure>.
loop at <et_screen_structure> assigning <ls_screenline_any>.
assign component 'EXTERNAL_ID'
of structure <ls_screenline_any> to <lv_cgpl_extid>.
CALL FUNCTION 'Z_CRM_MKTPL_STOREREAD_MECHANIC'
EXPORTING
EXTID = <lv_cgpl_extid>
IMPORTING
TEXT1 = lv_text1.
if lv_text1 is not initial.
assign component 'TEXT1'
of structure <ls_screenline_any> to <lv_cgpl_text1>.
<lv_cgpl_text1> = lv_text1.
CLEAR: LV_TEXT1.
endif.
endloop.
endif.

Similar Messages

  • Text Manipulation and Variable Data in Photoshop

    Our company is getting into variable data printing. There are a few ways to get variable data into photos. I've played with a program called Direct Smile. Its text manipulation tools are rather good. It lays a grid over the text and you can select each grid intersection and pull and push to get the text into the shape you want.
    There are other programs that work through InDesign and Photoshop, using scripts to insert the variable data into the Photoshop text layer.
    When I tried to warp the text in Photoshop I found that beyond a certain point, you have to flatten the text, at which point, it's no longer a text layer that can accept variable data from a database.
    Is there anything like the grid tool in Direct Smile in Photoshop?

    I’m unfamiliar with Direct Smile.
    But for text-manipulation in Photoshop You might want to consider converting the Text to a Smart Object which can then be warped or treated with the Distort-Filter Displace, all the while maintaining the text-layer within the SO and thusly its editability.
    And if I remember correctly one can even make Liquify applicable as a Smart Filter, but one would have to save the Mesh separately … possibly too problematic a solution.
    Or You could go via Illustrator which offers Envelope Distort (which provides a grid-based »plasticity«) and then embed the result thereof as a SO in the Photoshop-file. Unfortunately Illustrator doesn’t Script as comfortably as Photoshop in my limited experience and Envelope Distort my be unscriptable altogether.
    But if I understand correctly You will want to automate all that stuff, so maybe You should check out the respective Scripting-Fora.

  • In Design and Variable Data Printing....

    Does In Design have VDP capabilities.  I am thinking of designing a 2 part NCR form that is numbered.  Is it possible to include the numbering sequence in the design so that as it prints it numbers each form sequentially (similar to name and address info but a specific number)?
    Thank you!

    on the indystimer website there is no set of instructions or tutorials but the script is only used to generate the range of numbers that I want for the database e.g. 000201-000500. this can be done in excel too but i just find the indysnumbergenerator a lot quicker.
    in terms of actually making a datamerge, see the adobe tutorial http://www.adobe.com/designcenter/indesign/articles/indcs2at_datamerge.html
    to make a datamerge so that the end result is pages printed single sided but in duplicate so the records appear:
    pdf page 1 - record 1 top sheet
    pdf page 2 - record 1 bottom sheet
    pdf page 3 - record 2 top sheet
    pdf page 4 - record 2 bottom sheet...
    is to design the merge on one page including the variable data, BUT once it is finished, duplicate the page from the pages palette so that there is now two pages in the file. when exported to PDF via the data merge as above should result.
    is this what the OP is after?

  • Obiee 11g - Formula between fixed date and variable date

    Need some advice please, I’m trying to modify a campaign report for Marketing so we can track over different periods of time. For example
    Start Date +7 days (all volume within this period)
    Start Date +28 days ( all Volume within this period)
    And so on and so on….
    BUT I’m struggling to use a formula that will do this. The start date for a campaign will always be different hence why we want capture everything between Start Date + (what ever number of days are set). In the report we have a start date, campaign name and number converted to application (Measure). Any help here would be brilliant lol. At the moment when we go into the report, it gives us the measure count to date. We just want to split it down over different periods basically.

    I assume we are talking about PCR for payroll. In this case look at documentation for operation NUM:
    OOOOOO
    Xnnnnn
    X     Table
    nnnnn Table field
    nn    Date type 'nn' from the Date Specifications infotype (0041)
         Date types are taken from table T548Y.
    Your operation would look like:
      NUM=Faaesb
          F          Fixed indicator for deadline calculation
           aa           Date type: Start date of period to be
                        calculated; if the date type is not 'nn,'
                        the second position is left blank.
             e          Unit, in which the duration is calculated:
                        T = days
                        W = week
    s         End date of period to be calculated:
              (blank)  End of current payroll period
              J        End of current calendar year
              A        Start of current calendar year
              B        Start of WPBP period
             No other specifications are possible.
    So it depends on what kind of fixed date you need.
    Hope it helps,
    Carlos.

  • How to initiate a RFC fuction module from ABAP and push data to Java prgm

    I want to push the data from ABAP program to a java program, the RFC connection has to be initiated from ABAP. How can i do this.
    Kindly help me with a example program if possible.
    Thanks in advance.
    Sounder.

    Hi,
    If you are using JCo connector for the interface, then please look into this link
    http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf
    aRs

  • Calling a new browser window with WD Abap and passing data via POST

    Hi there,
    does anybody know whether passing data via POST method is possible when opening a new browser window from within a Web Dynpro Component? In my case I use method IF_WD_WINDOW_MANAGER->CREATE_EXTERNAL_WINDOW for opening a new browser window. Now I want to pass a big amount of data which is only possible via POST method. How can I achieve that or is it not considered inside the Web Dynpro Framework?
    Kind regards,
    Albert

    Hi Priya,
    can you please explain a little bit more what you mean? I didn't get it..
    Kind regards,
    Albert

  • Label is not printing in 5 th page and item data appering before the morgin

    Hi friends,
    In script. All pages comming prperly.. but  last page the labels are not prining and item data is printing upside the morgin only.. what is the problem?.. All pages its comming properly...except last page..
    if soem body knows .. please help me..

    I agree with Shiva Kumar - most likely there is no such field in it_afpo. A few more suggestions though:
    1) Do not post large pieces of code here - if you have a question about a particular SELECT statement, post only that statement and relevant data definitions. No one is going to read your whole program  anyway - we have work to do too.
    2) Your JOIN is way too big and would be difficult to analyze if anything goes wrong. You might want to start with smaller SELECTs and, when you're sure everything is working correctly, then combine them into one. Also huge JOINT is not necessarily more efficient.
    3) You don't have to use aliases "AS a... AS b", etc. Instead, just use the table name, e.g. AFKO... AFPO... .It is much easier to read this way. The aliases are needed only if you're joining the same table more than once. Also they're not limited to one letter either.

  • Any Function Module to translate variable data in smartform

    Hi All,
    I am working with smartform.
    My requirement is, when user logins with Japan language.
    then all the data  ( text template and variable data )  should be in Japan .
    By using  SE63 ,i can translate only text data.  How about the variable data in smartform?
    Please suggest any solution.
    Regards,
    Kishan

    Hope you are passing the variable from print program. If not then do the same. and in the print program do the below thing.
       wf_spras = sy-langu.
    CALL FUNCTION 'CONVERSION_EXIT_ISOLA_OUTP
          EXPORTING
               input  = wf_spras
          IMPORTING
               output = wf_language.
      SET LANGUAGE wf_language.
    wa_control_parameters-langu = wf_spras.
    PS : wa_control_parameter , you pass through control_parameters, in to the SMARTFORM calling FM .
    Make sure that the data, which u fill into the variable you are talking about in maintained in the log on language also.

  • Prob creating ABAP Proxy-Interface use external and interna msg definition

    Hi,
    I've created a service interface using external definition (message type for request and response), imported via WSDL file. However, while creating ABAP proxy in SPROXY, it gave the error message "Interface uses external and internal message definition". I searched through the forum, the questions were raised but no definite answer was found. Is it not possible to generate a proxy if there is any external definition used?
    Details of the error message:
    Message no. SPRX122
    Diagnosis
    In a message interface you can use messages from different sources:
    Message types and fault message types edited in the Enterprise Services Repository
    Messages imported into the Enterprise Services Repository (external definitions, RFC, IDoc)
    In the current message interface, message types from different sources have been used. Since messages from these different sources must be handled differently during proxy generation, such a mixture of messages within a message interface is not possible.
    System Response
    The interface cannot be generated.
    Procedure
    Change the interface definition accordingly in the Enterprise Services Repository.
    p/s: My external definition is actually derived from a ABAP FM web service. The reason why i used external definition is that i try to avoid the tedious steps of hard-coding all the data types for the request and response message types.
    Any help would be highly appreciated.
    - julius

    Hi Arvind,
    For technical reasons, proxy generation and the respective editors in the Integration Builder do not support the entire language range of XML schema and WSDL. For an overview of which language elements are supported, see the Excel spreadsheet in the SAP Service Marketplace at service.sap.com/xi ® Media Library ® Documentation: SAP XI 3.0 (SP11) u2013 Supported XML Schema and WSDL (EN).
    I couldnt find the above document in the service market place. Any hint to find it?
    Thanks.
    - julius

  • Illustrator Data Sets and Variables Help Please

    Hi, how's everyone doing?  I need a little help with Data Sets and Variables, or at least i believe that's what i need help with.  Ultimately i am trying to run an action on a batch of files. 
    I have an eps file with two images placed side by side.  They are the same image.  I am trying to replace both images and save the file accordingly.  Trying to make this happen using a bunch of files.  All the files can be in one folder and will be the same size. 
    I hope this make sense and what i need done is doable.
    Any help or advise would be greatly appreciated.
    Thanks in advance.

    Not sure a I read you correctly but if I understand you
    what you have to do is make the first two images as dynamic variables using the variable panel and save it as a data set
    then replace those two images and save those as a data set
    So now you have data set one and two.
    You can save that as an variable library (xml)and that can be loaded into other documents.
    The question is can it be actioned?
    It can be scripted and do you want the same two images to replace the same two image in each document.
    I think you really have to tell us more.

  • Secret data sets and variables in photoshop elements.

    In photoshop elements 4 thru 8, you can use data sets
    and variables, with the actions recorded for them in
    photoshop and then installed into photoshop elements.
    They work exactly like they do in photoshop and in fact
    there is already a menu item in photoshop elements,
    under in export menu, called export data sets as files.

    Not sure a I read you correctly but if I understand you
    what you have to do is make the first two images as dynamic variables using the variable panel and save it as a data set
    then replace those two images and save those as a data set
    So now you have data set one and two.
    You can save that as an variable library (xml)and that can be loaded into other documents.
    The question is can it be actioned?
    It can be scripted and do you want the same two images to replace the same two image in each document.
    I think you really have to tell us more.

  • Calling and manipulating data on an Interactive Adobe form from ABAP report

    Dear All,
    Can you please tell me how to call an interactive adobe from from a custom adobe form?
    If so how can we pass and receive data between the interactive adobe form and the abap report program?
    Thank you.
    Regards,
    Prosenjit.

    Hi,
    It is possible to call an Interactive Adobe form from ABAP report and pass data into the form. If you search the forum, you will get many threads explaining the process. Let me know if you have any specific questions on this.
    Regards,
    Sanoosh

  • Create a table and upload data in MS ACCESS from SAP ABAP programming?

    Hi All,
    How to create a table in MS ACCESS database and Upload SAP database table data into MS ACCESS table using ABAP programming?
    Explain: My client requirement is " If he/she runs a ABAP Program, that will create a table and upload data into MS ACCESS Database table in background. "
    Could you please give the solution or code? I know the program RIACCESS and I went through the SAP Note 583698.
    Is this only solution for this?  Or Any other possibilities?
    Please give me solution.
    Thanks in advance.

    Hi,
    It is not possible to create tables in a non SAP schema from inside SAP.
    The SAP-Oracle license also does not allow you to create the table (see note 581312):
    the following actions, among other things, are therefore forbidden at database level:
    Creating database users
    Creating database segments
    Querying/changing/creating data in the database
    Using ODBC or other SAP external access methods
    Please refer following link,
    [Ckick Here|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do]
    You can also do it by LSMW,
    If you are using Access 97, you can download directly into an access
    database from SAP. See program RIACCESS for details. You have to establish
    an RFC destination PS_ACCESS_1 and 2.
    There are then a couple of function modules. Go to SE37 and put in
    msaccess and hit PF4.
    The following is from the readme file: sapgui/ps/readme.sap
    For the MS-Access interface SAP delivers 4 files:
    WDPSASTR.EXE This is an RFC server program that is called by SAP R/3
    (PS module). This program creates a MS Access database. The structure
    information of the tables is transferred from R/3. In addition to
    these tables a table named DDIC is created. This table contains the
    structure information and should in no case be modified or deleted.
    WDPSATAB.EXE This is an RFC server program that is called by SAP R/3
    after WDPSASTR. This program filles the tables of the database with data.
    There must not be made any changes of the structure of
    the tables between the calls of WDPSASTR and WDPSATAB.
    WDPSAZET.EXE This is an RFC client program that triggers work/time
    confirmations in the PS module of SAP R/3 (like transaction CN27 Collectiv
    confirm).
    WDPSAMAT.EXE This is an RFC client program that triggers material
    confirmations in the PS module of SAP R/3 (like transaction MB1A - Goods
    Please also refer following links,
    [Click here|Upload data from MS Access tables, to SAP tables.;
    Before using the program "RIACCESS", you need to install the PS utilities, which are part of SAPGUI install CD.
    It is available in the "SAPGUIPS directory".
    Then do the followings :
    1. Select transaction code SALE -> Systems in network-> Define RFC Destination.
    2. You will need two RFC destinations (TCP/IP connections for the front-end workstation).
    Setup the two RFC destinations PS_ACCESS_1 and PS_ACCESS_2 and you'll have to get them to point to
    wdpsastr.exe and wdpsatab.exe respectively.
    3. Then execute RIACCESS and choose PS_ACCESS_1 to generate access tables.
    The system must also be able to access the RFC-DLL files (librfc2.dll, librfc3.dll, librfc4.dll, librfc5.dll, librfc6.dll, vrfc.dll).
    Please note that Access only supports tables with up to 255 fields.

  • Inner join in ABAP and exporting the data

    Hi,
    I want to use inner join in ABAP for retrieving data from 2 tables and export that data.How will i do it?

    Hi,
    Refer following code
    *--Select query to pick the data from table VBRK
    VBRP and VBPA using inner join
      SELECT a~vbeln                            "Billing document
             a~fkdat                            "Billing date
             a~fktyp                            "Billing category
             a~fkart                            "Billing type
             a~vtweg                            "Distribution channel
             a~knumv                            "Number of doc condition
             b~posnr                            "Billing item
             b~matnr                            "Material Number
             b~werks                            "Plant
             b~vgbel                            "Referance
             b~netwr                            "Net value of billing item
             b~wavwr                            "Cost in document currency
             c~kunnr                            "Partner function
             FROM vbrk AS a
             INNER JOIN vbrp AS b
             ON avbeln EQ bvbeln
             INNER JOIN vbpa AS c
             ON  bvbeln EQ cvbeln
            AND bposnr EQ cposnr
             INTO CORRESPONDING FIELDS OF TABLE it_vbrp
             WHERE fkdat IN s_erdat
             AND   parvw EQ 'ZS'.
      IF sy-subrc EQ 0.
    *--Sort table by
        SORT it_vbrp BY vgbel1.
      ENDIF.
    Regards,
    Prashant

  • Call external URL from ABAP userexit, capture data and return it to SAP?

    My apologies if this question has been asked before, but I've searched for a few hours today and haven't found anything directly related to my question.  Thank you in advance for any help you may be able to provide!
    I would like to be able to make a call from an SAP userexit during Sales Order Entry in the VA01 transaction in the SD module to an external website, allow the user to capture some data in the external site and then pass that data back into the userexit where I can use it to populate internal tables, etc.
    I'm completely unfamiliar with Web Dynpro programming, but this seems like a good place to start my search for a solution. 
    Does this sound like a problem that can be solved with Web Dynpro and what documentation or code examples should I reference to go about building such a solution.
    I should also note that I'm hoping to build a solution that could be called from any userexit in R/3, SAP ERP, SAP CRM, etc. and would obviously need to learn about what dependencies to consider (ex: SAP GUI version, SAP product release number, Web AS release, etc.).
    Eric

    Thank you for the response.  Let me provide some additional information.
    The external application will be a Hosted Web page.  It is not an SAP system. 
    The external application will be a web page served by a separate system outside of the company domain(shouldn't matter what the technology is I would think - but the web page will be hosted by a different company than the one calling the URL) that would appear as a web page in which the user will enter data, logic will be performed on that data and then some or all of the data would need to be passed back to the calling point in SAP.
    For practical discussions it doesn't matter to me if the call in ABAP occurs in an SD userexit, in a custom report, in an HR screen or in a CRM business partner screen.  There will be many places where this external application may be called from and I'm just trying to figure out how to call an external HTTPS URL and return data from that web page to the calling point in ABAP.
    I hope that clarifies my question.
    Thanks!
    Eric

Maybe you are looking for

  • Itunes wont open or reinstall keeps saying error

    I tried to open itunes on my windows the other day and it said error please reinstall intunes so I tried to reinstall and it kept saying it cannot reinstall. help

  • Equium A110-233 Broken laptop screen

    Hi, I have an Equium A110-233, the screen is broken. I have attached an external monitor and it displays when booting up until it gets to the Windows logon screen then it switches back to the laptop screen. Is there any workaround known for this othe

  • All my stored data in Numbers are gone. What do I do?

    All my stored data in "Numbers" are gone. What do I do?

  • Windows XP Trade-In Offer

    Windows XP Trade-In Offer On page 1 of the April 6-12 ad insert, we advertised Upgrade from Windows XP Today: Get a Minimum of $100 toward the purchase of a new computer when you trade in a working Windows XP laptop. Customers may only apply one $75

  • Dump transaction F110 - include RFFORI08

    Hello !! We Are in a project to upgrade SAP R / 3 4.7 Enterprise to ECC EHP4. After migrating to ECC EHP4 (SAP Release an Kernel 701 level 150) in transaction F110 by clicking Proposal, the dump is below: ======================= Syntax error in progr