Survey creation abap code help needed
hello experts,
I need to create a survey in crm, by taking values from end-user from a webpage
A sample code help is needed.
Thanks in advance
Take a look at this SAP note - It does a pretty good job of detailing the steps for you. No coding necessary, it worked out of the box for us after patching this note.
https://service.sap.com/sap/support/notes/638320
Similar Messages
-
Hi All,
My requirement is below :
In my DSO I have the data as below
doc number item con type Agreement
100 10 adc 1234
efg 5678
hij ' '
200 20 adc 1234
efg ' '
hij 5678
Now I have created a New Info object named flag. So now I am doing a self myself data mart where i need to write my routine to set data in the flag.
The data should be like
doc number item con type Agreement Flag
100 10 adc 1234 X
efg 5678 X
hij ' ' X
200 20 adc 1234 X
efg ' ' X
hij 5678 X
Note:- even if agreement is blank for hij we need to put X since agreement is available for the remaining two condition types.
Please can any one help with the code.and also please let meknow whether we shold write it in start routine or end routine
Thanks In advance
SreeHi Rookie ,
If i write the code below
DATA: ITAB TYPE TABLE OF tys_TG_1,
ITAB_WA TYPE tys_TG_1.
MOVE RESULT_PACKAGE[] TO ITAB[].
LOOP AT RESULT_PACKAGE ASSIGNING <RESULT_FIELDS>.
IF <RESULT_FIELDS>-AGREEMENT IS NOT INITIAL.
<RESULT_FIELDS>-FLAG = 'X'.
ELSE.
LOOP AT ITAB INTO ITAB_WA WHERE AGREEMENT IS NOT INITIAL AND
DOC_NO = <RESULT_FIELDS>-DOC_NO AND
ITM_NO = <RESULT_FIELDS>-DOC_NO.
<RESULT_FIELDS>-FLAG = 'X'.
EXIT.
ENDLOOP.
ENDIF.
ENDLOOP.
My requirement doesnt match
My requirement is below
doc number item con type Agreement
100 10 adc 1234
efg 5678
hij ' '
200 20 adc ' '
efg ' '
hij ' '
Expected result is
doc number item con type Agreement flag
100 10 adc 1234 x
efg 5678 x
hij ' ' x
200 20 adc ' ' ' '
efg ' ' ' '
hij ' ' ' '
regards
Sree -
Hi ,
I am trying to activate an ODS but it is failing the activation process . When I look into the application log I see this error "Value 'RAM???¿????????S RAM' (hex. '4D41524B3F3F3FBF3F3F3F3F3F3F3F3F5320574F524B') of characteristic ZEUID contains invalid characters "
I am new to ABAP and I need an ABAP code to filter this value when loading data into ODS .
Thanks a lot for your helpHI,
Write the code in the start routine.
IN the start routine you have a table called SOURCE_PACKAGE.
declare work area x_souce_package type source_package
data : lv_string(100).
loop at souce_package into x_source_package.
lv_string = x_source_package-value.
TRANSLATE LV_STRING TO UPPER CASE
if lv_string CA 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' .
ELSE.
DELETE SOURCE_PACKAGE INDEX SY-TABIX.
ENDIF.
endloop -
Urgent: ABAP Code help reqd
Hi,
Can anyone please me provide me ABAP code for the following case:
Table1 JHAGA
Table2 JHAGVZ
Primary keys in JHAGA:
Order Item Number [POS_NR]
Billing Dataset [GRUPPABRNR]
Sales Document Number [AVM_NR]
This requirement is for an InfoSet. For each order ideally we can have multiple sales agent. Sales Agent is being pulled from JHAGVZ. For this InfoSet we are going to go with assumption that we wont have more then 10 sales agent for an order,
Consider 10 extra fields in InfoSet SA1 SA10 for 10 Sales Agent.
I need code which to populate this sales agent field. If an order exists in JHAGA then for that order in JHAGVZ populate the SA1-SA10 field.
JHAGA Order#10
JHAGVZ Order#10 SalesAgent11
SalesAgent12
SalesAgent13
Then SA1 should have SalesAgent11, SA2 should have SalesAgent12 and SA3 should have SalesAgent13 and so on
Thank you,
samHI ,
Are these two field a part of the table INFOROBJECT?
if they are, you can write a select statement like :
select 0CUSTOMER 0SALESORG YLEG_ENTITY
from INFOROBJECT
into Y_CUST_LE
where ( Yacc_SEQ <> ´ZROO´ and
0PRICE_LIST <> space).
Hope this helps.
If not, please explain problem clearly. -
Abap Code help in Extractor!!!
Hi all
I am not an abaper, I am using Bw 3.5; I need to write a code in "ZBSIS" and "ZBSAS" Extractor Include program ZXRSAU01: so that the report based on cube "ZBSISAS" shows values for field Transaction key "ZKTOSL".
The field "KTOSL" is not active in R/3 Directory and gets filled in program RFWERE00 in Tcode F.19 in R/3.
I have to use the same logic in extractor as used in that program.
The logic is:
FORM GET_'KTOSL USING IAMOUNT LIKE EXTRACT-DMBTR
CHANGING 'EKTOSL' LIKE POST_COLLECT-'KTOSL'.
IF IAMOUNT < 0.
'EKTOSL' = 'GNB'
ELSE.
'EKTOSL' = 'BNG'
ENDIF.
ENDFORM.
Can any of you advice me on abap code for this logic?
I appreciate your help.
Thanks in advance
IshiHi,
You can use the following code in ZXRSAU01.
CASE i_datasource.
WHEN 'ZBSIS'.
DATA: g_wa_extractstructure LIKE <give the extractstructure of your datasource from RSA2>.
LOOP AT C_T_DATA into g_wa_extractstructure.
IF g_wa_extractstructure-DMBTR LT 0.
g_wa_extractstructure-ZKTOSL = 'GNB'
ELSE.
g_wa_extractstructure-ZKTOSL = 'BNG'
ENDIF.
MODIFY c_t_data FROM g_wa_extractstructure.
ENDLOOP.
ENDCASE.
Note:- . The same code can be used for ZBSAS. Please make sure to give the extract structure name in the field marked in <->.
Thanks,
Nithin reddy. -
ABAP code Help for Customer Exit variable
Hello All,
Can anyone provide ABAP code for a customer exit variable please?
Requirement:
0CALYEAR(InfoObject) - ZCALCYR (Variable) <b>Calender year with default value actual year</b>.
Proiperties of variable: single value,mandatory,ready for input,can'be changed in query navigation.
i have read some docs on customet exit variables which i got from SDN but i found it's difficult for me to get this as i am not that good in ABAP.
Thanks,
Rakesh.Hi,
Just check the below code. You just need to make slight changes I believe. Hope this helps you.
In CMOD ..
Sample code
INCLUDE LXRSRF01 *
data: l_s_range type rsr_s_rangesid.
case i_vnam.
when 'ZCALCYR'.
if i_step = 1.
l_s_range-low = sy-datum+0(4).
append l_s_range to e_t_range.
Endif.
Endcase. -
ABAP code help for Bex broadcasting by event!
Hello
I'm trying to broadcast a report for a specific time period as per factory calendar. I tried using System Time Point :RSRD_BROADCAST_FOR_TIMEPOINT but its not showing when In the broadcaster when I put restriction of factory calendar so i followed below link: Broadcasting timepoint scheduled after an event and created a PC to start after event and created variant for RSRD_BROADCAST_STARTER setting ID as my Bes broadcast setting technical name.
When I trigger the event its processed and report emailed to me as I expected. Now I want to run this (Trigger) this event every Wed day after fisc quarter close. I wrote the below logic in se38 PROGRAM. But Now I need little help on how to trigger /run only on wed days after fisc quarter close ? Please update the below code or guide me on how to achieve this.
CALL FUNCTION 'BP_EVENT_RAISE'
EXPORTING
EVENTID = ZFISC
endif.
Thanksin your ABAP code try this,
calculate whether current date falls after fiscal year quarter. If so then check whether its a Wednesday and call the event raise FM. You can schedule this program in background daily basis.
Use this FM for day calculation DATE_TO_DAY.
This FM for converting sy-datum to fiscal year/period - FI_PERIOD_DETERMINE,DATE_TO_PERIOD_CONVERT -
Hi Gurus,
I have a requiement, that is if there are 5 line items with in a document and each one has diffeerent tax jurisdiction code, then we should be showing only one tax jurisdiction code for a document. Line items are not displayed in report. The condition to pick up tax jurisdiction code is the one which has least ending zeros among all the lime items with in a document.
Supppose
Doc1 Item Tax Jurisdiction code
1800000002 1 CNQC00000000000
1800000002 2 CNQC00000000000
1800000002 3 CN0000000000000
1800000002 4 CNQC00000000000
1800000002 5 TXJOHNCLEBUR000
So here the value of Tax Jurisdiction code is TXJOHNCLEBUR000 as it has least ending zeros compared to other values with in a document.
Any help how to use the string function and acheive the desired result.
Thanks,
Raj.Hi Anand,
Thanks for the reply. we don't expect any non-zeros after seeing first zero. Now i have added another z object which will contain only least zeros for a doc. What I am doing is now after loading the data into the cube from ods i am doing loop back and updating the new z object. Below is the code I am trying to do
TABLES: /BIC/AZFGLO10100.
Defining an internal table as ods table****
Types: BEGIN OF ITAB_01,
doc_no LIKE /BIC/AZFGLO10100-AC_DOC_NO,
item_no LIKE /BIC/AZFGLO10100-ITEM_NUM,
taxjur LIKE /BIC/AZFGLO10100-TAXJURCODE,
length like num, ***** this will hold the length of the zeros
END OF ITAB_01.
loading the data from active ods table into defined internal table*****
select AC_DOC_NO ITEM_NUM TAXJURCODE from /BIC/AZFGLO10100 into table
Itab_01 where AC_DOC_NO = /BIC/AZFGLO10100-AC_DOC_NO and
item_num = /BIC/AZFGLO10100-ITEM_NUM.
sort itab_01 doc_no item_no
now I want to use code too populate the vlaue of length field in internal table (which shows how many zeros a tax jurisdiction code has for every corresponding line item)
then in the update rule of z tax jurisdiction i will wirte a routine such that
select taxjur into result from itab_01 where doc_no = COMM_STRUCTURE-doc_no and length = min(length).
now I have one more doubt , the number of items in a document will be varying so how to takecare of this...
If possible can you please provide me with the abap code that you have mentioned in earlier post.
Any more help on this is really appreciated.
Thanks,
Raj -
Hi,
In the ABAP inbound (server) proxy, I have written code like this.
DATA: lt_material TYPE TABLE OF zxdt_material,
ls_material TYPE zxdt_material,
ls_input type zxmt_cam.
ls_input = input.
lt_material = ls_input-mt_cam-material.
Here, material is a table type which should have 10 records of material. But it has only one records always eventhough I am passing 10 records in the input xml.
What could be the reason?
Any help is really appreciated since I am trying this for a long time now.
Thanks
RickyExample code...
here header has simple structure type (non repeating) so we directly assigning fields
INPUT-ACCOUNTLIST-ACCOUNTDETAILINFO has proxy table structure(repeating structure) ,.... so we have used internal table for that..
FUNCTION Z_00FI_ACCOUNTS_RECON_DAT.
""Local Interface:
*" IMPORTING
*" REFERENCE(INPUT) TYPE ZDT_ACCOUNT_RECON_INFO_TARGET4
TABLES:ZT00FI_ACCDATA, "Accounts Data
ZT00FI_ACCHEAD.
DATA:
LT_ACCOUNTLIST TYPE TABLE OF ZDT_ACCOUNT_RECON_INFO_TARGET3,
LT_ACCDATATAB TYPE TABLE OF ZT00FI_ACCDATA,
LT_ACCHEADERTAB TYPE TABLE OF ZT00FI_ACCHEAD,
LS_ACCOUNTLIST TYPE ZDT_ACCOUNT_RECON_INFO_TARGET3,
LS_ACCDATATAB TYPE ZT00FI_ACCDATA,
LS_ACCHEADERTAB TYPE ZT00FI_ACCHEAD,
LS_HEADER TYPE ZDT_ACCOUNT_RECON_INFO_TARGET.
SELECT SINGLE * FROM ZT00FI_ACCHEAD
WHERE BATCHID = INPUT-HEADER-BATCHID AND
SUBBATCHID = INPUT-HEADER-SUBBATCHID.
*IF SY-SUBRC NE 0.
MOVE:
INPUT-HEADER-SOURCEREF TO LS_ACCHEADERTAB-SOURCEREF,
INPUT-HEADER-BATCHID TO LS_ACCHEADERTAB-BATCHID,
INPUT-HEADER-SUBBATCHID TO LS_ACCHEADERTAB-SUBBATCHID,
INPUT-EXTRACTIONINFO-DATAVERSION TO LS_ACCHEADERTAB-DATAVERSION,
INPUT-EXTRACTIONINFO-SOURCESYSTEM TO LS_ACCHEADERTAB-SOURCESYSTEM,
INPUT-EXTRACTIONINFO-COUNTRYCODE TO LS_ACCHEADERTAB-COUNTRYCODE,
INPUT-EXTRACTIONINFO-NUMBEROFACCOUNTS TO LS_ACCHEADERTAB-NUMBEROFACCOUNTS,
INPUT-EXTRACTIONINFO-STARTTIMESTAMP TO LS_ACCHEADERTAB-STARTIMESTAMP,
INPUT-EXTRACTIONINFO-ENDTIMESTAMP TO LS_ACCHEADERTAB-ENDTIMESTAMP,
INPUT-EXTRACTIONINFO-DELTAINDICATOR TO LS_ACCHEADERTAB-DELTAINDICATOR,
INPUT-EXTRACTIONINFO-LASTBATCHINDICAT TO LS_ACCHEADERTAB-LASTBATCHINDICAT.
MOVE 'N' TO LS_ACCHEADERTAB-PROCESSINDICATOR.
APPEND LS_ACCHEADERTAB TO LT_ACCHEADERTAB.
INSERT ZT00FI_ACCHEAD FROM TABLE LT_ACCHEADERTAB.
MOVE INPUT-ACCOUNTLIST-ACCOUNTDETAILINFO TO LT_ACCOUNTLIST.
LOOP AT LT_ACCOUNTLIST INTO LS_ACCOUNTLIST.
MOVE:
INPUT-HEADER-BATCHID TO LS_ACCDATATAB-BATCH_ID,
INPUT-HEADER-SUBBATCHID TO LS_ACCDATATAB-SUBBATCH_ID.
MOVE-CORRESPONDING LS_ACCOUNTLIST TO LS_ACCDATATAB.
APPEND LS_ACCDATATAB TO LT_ACCDATATAB.
CLEAR:LS_ACCOUNTLIST,
LS_ACCDATATAB.
ENDLOOP.
INSERT ZT00FI_ACCDATA FROM TABLE LT_ACCDATATAB.
COMMIT WORK.
*ENDIF.
ENDFUNCTION. -
ABAP MAPPING:Help needed
Hi Friends,
I have a scenario where I need to pick up Idocs out of a packet of Idocs .The Idocs will be picked by checking for a certain condition for the Idoc Segement and of all the Idocs the Idocs which satisfy a particular condition should only be output and for this I have been asked to achieve this using ABAP Mapping.So any info in this regard would be of great help for me.
Packet of Idocs----
> Idocs satisfying the cond.
(sender)*********(Check for a condition)*****(Receiver)
Please do provide with me a sample coding if possible.Please take up this with some priority.
Thanks & Regards,
Pradeep.Hi All,
The output from the ABAP class needs to be transformed into a different message using Graphical Mapping .
Please provide me some inputs for creating this ABAP mapping.
Thanks & Regards,
Pradeep. -
// Code Help need .. in Reading CSV file and display the Output.
Hi All,
I am a new Bee in code and started learning code, I have stared with Console application and need your advice and suggestion.
I want to write a code which read the input from the CSV file and display the output in console application combination of first name and lastname append with the name of the collage in village
The example of CSV file is
Firstname,LastName
Happy,Coding
Learn,C#
I want to display the output as
HappyCodingXYZCollage
LearnC#XYXCollage
The below is the code I have tried so far.
// .Reading a CSV
var reader = new StreamReader(File.OpenRead(@"D:\Users\RajaVill\Desktop\C#\input.csv"));
List<string> listA = new List<string>();
while (!reader.EndOfStream)
var line = reader.ReadLine();
string[] values = line.Split(',');
listA.Add(values[0]);
listA.Add(values[1]);
listA.Add(values[2]);
// listB.Add(values[1]);
foreach (string str in listA)
//StreamWriter writer = new StreamWriter(File.OpenWrite(@"D:\\suman.txt"));
Console.WriteLine("the value is {0}", str);
Console.ReadLine();
Kindly advice and let me know, How to read the column header of the CSV file. so I can apply my logic the display combination of firstname,lastname and name of the collage
Best Regards,
Raja Village Sync
Beginer CoderVery simple example:
var column1 = new List<string>();
var column2 = new List<string>();
using (var rd = new StreamReader("filename.csv"))
while (!rd.EndOfStream)
var splits = rd.ReadLine().Split(';');
column1.Add(splits[0]);
column2.Add(splits[1]);
// print column1
Console.WriteLine("Column 1:");
foreach (var element in column1)
Console.WriteLine(element);
// print column2
Console.WriteLine("Column 2:");
foreach (var element in column2)
Console.WriteLine(element);
Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP] -
SAP Query :: ABAP Code Help
Hi,
I have created a query which reads a material Table and has consumption by date. What I want the report to do is show me a total number of PO's by month. i.e. below
Any idea how can I go about this? I can understand ABAP but don't know how to put it in buckets via a query i know i have to create 12 fields called Jan, Feb, March, April etc but need the code to put date in the tables by month
E.g.
Material January Feb March April etc
MAT1 23 22 21 11
MAT2 35 67 89 33 etc
THanksABAP Program created
-
I Have a little problem
i want to push a button in creator that execute the following SQL code
INSERT INTO NAMES2(NAME,ID)
SELECT NAME,ID
FROM NAMES
WHERE ID = '1' ;
this sql code take a row from a table to another table and so on i need that happen from a button in creator in other word how can i but this code in the java
i think it's simple but i didn't find it in any place i know
so can Any one Help Me:)because sql is more faster 1000 timeswho told u that ??? how u measuer this ?
u can use ordinary way in adding or deleting recordes in database using DataSource Connection booling
i think u can do this by the way of DataProvider ,, as the tutorials tell u that ,,, it is easy and straightforward
http://developers.sun.com/jscreator/learning/tutorials/2/inserts_updates_deletes.html
hope this will help u
good luck
Muhammed -
Dear SAP experts,
Would you be able to help me in configuring the right xslt code to accomodate the looping logic?
Source Document:
School (occur only once)
- Name (can occur multiple times)
- Nickname (occur only once)
- Desired name (occur only once)
Target Document:
School
- Name
- Nickname (the value for this should be obtained from 'Desired name field')
- Desired name
I have this code, but seems not working in looping logic. (to accomodate the multiple Names):
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" media-type="xml" encoding="UTF-8" indent="yes"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="Order/OrderDetail/ListOfItemDetail/ItemDetail/BaseItemDetail/ItemIdentifiers/PartNumbers/BuyerPartNumber">
<BuyerPartNumber>
<PartNum>
<PartID>
<xsl:value-of select ="/Order/OrderDetail/ListOfItemDetail/ItemDetail/BaseItemDetail/ItemIdentifiers/PartNumbers/ManufacturerPartNumber/PartID"/>
</PartID>
</PartNum>
</BuyerPartNumber>
</xsl:template>
</xsl:stylesheet>
What happened is that the value was taken ONLY on the 1st line item. (1st Name occurence)
The succeeding Name field just copied the value of Nicknames from the 1st Name field.
Kindly advise how to handle the context (loop logic) in the xslt code.
Thanks!Apologies, but, it seems i did not indicate the complete message structure for the document I am testing.
Order (root)
OrderHeader (1st parent segment)
OrderNumber (child fields - 1st)
Order.. (child fields - 2nd)
Order...(child fields - 2nd)
OrderDetail (1st parent segment)
<fields under this segment were already mentioned from previous threads>
OrderSummary (1st parent segment)
NumOfLines (child fields - 1st)
TotalAmount (child fields - 1st)
Under Order, there are also OrderHeader and OrderSummary parent segment, other than OrderDetail, in which we focus our code.
I've tried your code, but, the segments OrderHeader and OrderSummary and child fields under it were not appearing on my output.
But it seems, I've already generated the correct code.
Here it is,
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" media-type="xml" encoding="UTF-8" indent="yes"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
<xsl:template match="/Order/OrderDetail/ListOfItemDetail/ItemDetail/BaseItemDetail/ItemIdentifiers/PartNumbers/BuyerPartNumber">
<xsl:for-each select=".">
<BuyerPartNumber>
<PartNum>
<PartID>
<xsl:value-of select="../ManufacturerPartNumber/PartID"/>
</PartID>
</PartNum>
</BuyerPartNumber>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
I believe, the code you've suggested last time will accomodate only OrderDetail parent segment. Is this correct?
Thanks! -
ABAP Proxy, Help needed regarding Naming Conventions
Hi,
I have made a ABAP Proxy Scenario to a File Service. The Objects have been created in the INTEGRATION REPOSITORY and the Configurations are made in INTEGRATION DIRECTORY. While Creating the PROXIES executing the TCode "SPROXY", the Proxies for the DATA TYPE and the MESSAGE TYPE are being created successfully but the Proxy for the Outbound MESSAGE INTERFACE is not getting created.
The Error says the Name must begin with 'CO_'. All the Objects that have been created by me begin with "Z_", and I have also made a Custom Package called "ZPROXY" and assigned this package . The error says Naming Errors.
Can anyone please help me out on this.
<b> The Proxy Class that is being generated starts with "CO_" and so checking out in SE24, it says Object does not exist.</b>
So please tell me how I can go about Correcting this.
Thanks and Regards
SomnathHi,
Thanx a lot for ur reply UDO...but this is not solving my Problem, actually when I am trying to Create the Proxy for the Outbound Message Interface, it is automatically Prefixing the "CO_". Thus I cannot Save it after this and also not see it in SE24.
A few more details:
<b>
The Outbound Message Interface name that I have used is "Z_ABAP_PROXY_MSG_INTERFACE"</b>
We i Create it Prefixes a "CO_" before the Interface name and it cannot be saved or seen in SE24.
Do provide me with some Help.
Thanking you in anticipation.
Warm Regards
Chakra
Maybe you are looking for
-
Error message says i need to be subscribed to itunes
I have been able to download music from itunes prior to today. I wanted to download more music but I can't even get access to do a search. The error message is: I must be subscribed to itunes. On a related note: I purchased an apple tv last week, and
-
XML Signature using an XPath filter
I want to sign an XML document, just based on the content of a particular element in the document. Based on the jwsdp docs it looked pretty simple, but I'm getting strange results. I'll get the same digest value in the SignedInfo for different Xpath
-
How do i update iTunes match?
I started matching my library and had to stop. How do I get the match going again?
-
My Ipod gen. 4 flashes the apple on and off. My Itunes account doesn't see I have my Ipod on the USB.What can I do to fix it? What is my issues?
-
JUnit for JDev Extension project
Hi All, Just like JUnit integration for ADF BC's, does JDeveloper have any inbuilt wizard/support for JUnit in JDev extension project? Thanks