How to retrieve data from a function module and use it in sap script??
I have a report program, which calls a function module. This function module internally calls an include program. In this program, I have a variable which is to be used in the sap script. How can I send this variable to the sap script
Hi,
In your case, Include prog is part of FM, no need to treat it as an Entity.
Now, Your Answer -
In SCRIPT - IN Page Window -->
PERFORM GET_MVAT_TIN IN PROGRAM Z_SCRIPT_PERFORMS_ABAPDB3
USING &VBDKR-KUNRE&
CHANGING &STCD1&
CHANGING &STCD2&
ENDPERFORM
IF &STCD1& <> ' '
<B>MVAT Number :</> &STCD1&
ENDIF
Then go to SE38 --> Creat prog with type - Subroutine pool
In that Write FORM statement for this PERFORM.
FORM get_mvat_tin TABLES inttab STRUCTURE itcsy
outtab STRUCTURE itcsy.
DATA : v_kunre TYPE kna1-kunnr,
v_stcd1 TYPE kna1-stcd1,
v_stcd2 TYPE kna1-stcd2.
LOOP AT outtab.
CLEAR outtab-value.
MODIFY outtab.
ENDLOOP.
READ TABLE inttab INDEX 1.
v_kunre = inttab-value.
IF v_kunre CA sy-abcde.
ELSE.
UNPACK v_kunre TO v_kunre.
ENDIF.
" Here You can take your Funcion module ***************************
SELECT SINGLE stcd1 stcd2 FROM kna1 INTO (v_stcd1, v_stcd2)
WHERE kunnr = v_kunre.
IF sy-subrc = 0.
READ TABLE outtab INDEX 1.
WRITE v_stcd1 TO outtab-value.
MODIFY outtab INDEX 1.
READ TABLE outtab INDEX 2.
WRITE v_stcd2 TO outtab-value.
MODIFY outtab INDEX 2.
ENDIF.
ENDFORM.
Similar Messages
-
I'm designing a sequential site workflow using Visual Studio 2010 for Project Server 2010. In my case, I have following 6 stages in the workflow:
1. InitialProposal Stage
2. Approval Stage1 -- Needs approval from Approver Project Security Group Members1
3. Rejection Stage
4. Approval Stage2 -- Needs approval from Approver Project Security Group Members 2
5. Execution Stage
6. Completed Stage
Requirement is workflow should move to Approval stage2 from Approval stage1 if approved by all members of Approver Project Security Group1and it should move to Rejection Stage even if a single member rejects it.
Workflow should move from Approval Stage2 to Execution Stage if approved by all members of Approver Project Security Group2 and it should move back to Approval Stage1 on rejection by a single member of the group.
I'm using inbuilt PSWApproval content type and OfficeTask activity for creating approval task for the group members at both stages.
On task rejected in Approval stage2, task will be assigned again to Approval Stage1 and I want to show comments given by members of Approver Project Security Group2 to the members of Approver Project Security Group1 with this assigned task
but I'm not able to retrieve comments from officeTask activity.
My question is where exactly these comments are saved? how can we retrieve them and use them in another officetask activity? If this is not possible then what is the possible solution for meeting above mentioned business requirement?Hi Paul,
Thanks for your suggestion.
By comments field I'm assuming OfficeTask.Comments field. Problem is, this field is always null. I tried accessing this field in CheckExitCondition activity as well as in OnTaskCompleted but in both the cases, it was null only(I wrote comments while approving
the task).
I used a code activity within OnTaskCompleted activity and following code for accessing Comments and Description fields:
public string officeComments;
public string officeDescription;
private void TaskCOmplete(object sender, EventArgs e)
CodeActivity Sender = (CodeActivity)sender;
Microsoft.Office.Workflow.Actions.OfficeTask ofctask1 = ((CompositeActivity)Sender.Parent).Parent as Microsoft.Office.Workflow.Actions.OfficeTask;
officeComments = ofctask1.Comments;
officeDescription = ofctask1.Description;
Please tell me if I'm doing anything wrong here, I'm very new to Workflows. Also, do I need to set any specific property of officeTask for retriving comments?
Thank you -
I send the frame by a microcontroller ( 8bits) the fram contains 6 bytes, 2bytes conform a long variable, I want to decode the frame and make operations with these long variables and then plot them
Hey jpvans,
I would first suggest using NI-VISA to talk to the serial port. Then, you can use the LabVIEW Type Cast or the Flatten to String and UnFlatten From String VIs to convert the data.
You can setup the read so that it reads just two characters at a time to form an individual long or you can set the read up to read it all and then use the string functions like String Subset to cut the information into chunks.
I hope this helps out.
JoshuaP -
How to Retrieve data from Variant Table
Can anyone help me by telling how to retrieve data from variant table which was created by user. I am able to see data of variant table only thru cu60 transaction but not se11. I s there any function module to do this?
Hello Mohan,
if u already have data and u want to populate it in F4 help then use below code -
u Have to make use of FM - 'F4IF_INT_TABLE_VALUE_REQUEST'
REPORT ZGILL_VALUE_REQUEST .
data: begin of lt_all occurs 0.
include structure DYNPREAD.
data end of lt_all.
data: begin of lt_selected occurs 0.
include structure DDSHRETVAL.
data: end of lt_selected.
DATA: BEGIN OF lt_code OCCURS 0,
code LIKE zgill_main-PERNR,
END OF lt_code.
data no_dyn like sy-dynnr.
Parameters : ECODE like zgill_main-PERNR.
*parameters: pernr like pa0001-pernr .
no_dyn = sy-dynnr. "give the scren no directly or sy-dynnr in case of report.
At selection-screen on value-request for ECODE.
select PERNR into table lt_code from zgill_main.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ECODE'
dynpprog = sy-repid
dynpnr = no_dyn
dynprofield = 'ECODE'
window_title = 'Employee Details'
value_org = 'S'
DISPLAY = 'F'
TABLES
value_tab = lt_code
RETURN_TAB = lt_selected.
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
*if sy-subrc eq '0' .
write: 'success'.
*endif.
read table lt_selected index sy-tabix.
move lt_selected-fieldval to ECODE. -
How to retrieve data from table(BOM_ITEM)
Hi All,
I wrote webservices using axis1.4 to get BOM information from SAP.. funtional module is CAD_DISPLAY_BOM_WITH_SUB_ITEMS
webservices works fine..I'am able to retrieve data from Export Parameter..But not able to retrieve data from table
How to retrieve data from table(BOM_ITEM)..?
Cheers, all help would be greatly appreciated
VijayHi,
1. Create Page Process.
2. Select Data Manipulation
3. In category select "Automated Row Fetch"
4. Specify process name, sequence, select "On Load - Before Header" in point.
5. Specify owner, table, primary key, and the primary key column(Item name contains primary key).
6. Create a process.
7. In each item select "Database Column" in "Source Type".
Regards,
Kartik Patel
http://patelkartik.blogspot.com/
http://apex.oracle.com/pls/apex/f?p=9904351712:1 -
How to retrieve data from URL or querystring in bsp pages
hi
how to retrieve data from URL or querystring in bsp pages.
thanks
Edited by: Vijay Babu Dudla on Mar 23, 2009 7:35 AMHello Friend,
Vijay is correct.
REQUEST is a system object available in runtime of BSP application.
It is the object of interface IF_HTTP_REQUEST.
Use methof REQUEST -> GET_FORM_DATA( )
Regards
Krishnendu -
How to retrieve data from domain(Value Range) of the table
hi
how to retrieve data from domain(Value Range) of the table
thanksHello,
You can try using the FM: DOMAIN_VALUE_GET TB_DOMAINVALUES_GET.
BR,
Suhas
Edited by: Suhas Saha on Mar 24, 2009 10:08 AM -
How to retrieve data from excel sheet
Hi,
How to retrieve data from excel sheet into a java file.janu05 wrote:
If we append a $ in the end of the table name it is showing an error saying "invalid name,should not contain any invalid character or punctuation"Great, I'm very happy for you.
Unless that was a question. In which case you might what to tell us a little more.
Like which API you are using (assuming we are still on "reading an Excel sheet". -
How to retrieve data from catsdb table and convert into xml using BAPI
How to retrieve data from catsdb table and convert into xml using BAPI
Points will be rewarded,
Thank you,
Regards,
Jagrut BharatKumar ShuklaHi,
This is not your requirment but u can try this :
CREATE OR REPLACE DIRECTORY text_file AS 'D:\TEXT_FILE\';
GRANT READ ON DIRECTORY text_file TO fah;
GRANT WRITE ON DIRECTORY text_file TO fah;
DROP TABLE load_a;
CREATE TABLE load_a
(a1 varchar2(20),
a2 varchar2(200))
ORGANIZATION EXTERNAL
(TYPE ORACLE_LOADER
DEFAULT DIRECTORY text_file
ACCESS PARAMETERS
(FIELDS TERMINATED BY ','
LOCATION ('data.txt')
select * from load_a;
CREATE TABLE A AS select * from load_a;
SELECT * FROM A
Regards
Faheem Latif -
How to retrieve data from MDM using java API
hi experts
Please explain me the step by step procedure
how to retrieve data from MDM using java API
and please tell me what are the
important classes and packages in MDM Java API
thanks
ramuHi Ramchandra,
You can refer to following links
MDM Java API-pdf
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2d18d355-0601-0010-fdbb-d8b143420f49
webinr of java API
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/89243c32-0601-0010-559d-80d5b0884d67
Following Fourm Threads will also help.
Java API
Java API
Re: usage of java API ,
Matching Record
Need Java API for Matching Record
Thanks and Regards,
Shruti.
Edited by: Shruti Shah on Jul 16, 2008 12:35 PM -
Query Report:To Retrieve Data from A/R Invoice and A/P Invoice
Hii Experts,
I am a new Sap B1 Trainee.I am facing a problem when retrieving data from A/R Invoice and A/P Invoice in order to track
Expenditure and Revenue according to a Bussiness partner,
I am using union to retrieve the information,but it is saying a error that Error Converting Varchar to Numeric and also
i would like to know how can i show the total final payment by reflecting Downpayments in A/R Invoice and A/P Invoice
With Regards
Cherry.Hii.
My Sap B1 version is 8.8.1 and patch level is 20. Actully i need a scenario where i can able to show both Expenditure and Revenue of a particular bussiness partner and profit/loss in a single query report.
I need some tips regarding this,When i am doing union i am getting conversion error converting varchar to numeric when i take
Sum(Line Total) from OINV and Sum(line total) OPCH group by docdate and docentry and BP .
and another scenario is how to deduct A/P downpayment or A/R downpayment from A/P invoices and A/R invoice to get the final Revenue and Expenditure ..
Thanks & Regards
Cherry -
How to get data from a USB-UIRT device using Labview?
How to get data from a USB-UIRT device using Labview?
I'm trying to get data from a USB-UIRT device, is it posible with Labview?
I really appreciate your help,
thanksYou may want to contact the developer of the device for the API and DLL.
http://65.36.202.170/phpBB2/viewforum.php?f=3 -
How to extract data from Essbase to Flat File using ODI
Hi,
Anyone know how to extract data from Essbase to Flat File using ODI?
Thanks in advance.
Regards,
SumardiHi,
Have you read through :-
Oracle Data Integrator Adapter for Hyperion Essbase Getting Started - http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/odiess_getting_started.pdf
Oracle Data Integrator Adapter for Hyperion Essbase User's Guide - http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/odiess_users.pdf
If you have read them and are still have a problem at what stage are you having the issues?
Cheers
John
http://john-goodwin.blogspot.com/ -
Problems with retrieving data from tables with 240 and more records
Hi,
I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.
I installed Oracle 11.2.0 Client and I started to have problems with retrieving data from tables.
First I used the same connection string, driver and so on (O10 Oracle 10g) then I tried ORA Oracle but with no luck. The result is like this:
I'm able to connect to database. I'm able to retrieve data but from small tables (e.g. with 110 records it works perfectly using both O10 and ORA drivers). When I try to retrieve data from tables with like 240 and more records retrieval simply hangs (nothing happens at all - no error, no timeout). Application seems to hang forever.
I'm using Powerbuilder to connect to Database (either PB10.5 using O10 driver or PB12 using ORA driver). I used DBTrace, so I see that query hangs on the first FETCH.
So for the retrievals that hang I have something like:
(3260008): BIND SELECT OUTPUT BUFFER (DataWindow):(DBI_SELBIND) (0.186 MS / 18978.709 MS)
(3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
(3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=1
(3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
(3260008): EXECUTE:(DBI_DW_EXECUTE) (192.982 MS / 19171.691 MS)
(3260008): FETCH NEXT:(DBI_FETCHNEXT)
and this is the last line,
while for retrievals that end, I have FETCH producing time, data in buffer and moving to the next Fetch until all data is retrieved
On the side note, I have no problems with retrieving data either by SQL Developer or DbVisualizer.
Problems started when I installed 11.2.0 Client. Even if I want to use 10.0.1 Client, the same problem occurs. So I guess something from 11.2.0 overrides 10.0.1 settings.
I will appreciate any comments/hints/help.
Thank you very much.pgoel wrote:
I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.Earlier (before installing new stuff) did you ever try retrieving data from big tables (like 240 and more records), if yes, was it working?Yes, with Oracle 10g client (before installing 11g) I was able to retrieve any data, either it was 10k+ records or 100 records. Installing 11g client changed something that even using old 10g client (which I still have installed) fails to work. The same problem occur no matter I'm using 10g or 11g client now. Powerbuilder hangs on retrieving tables with more than like 240 records.
Thanks. -
How to store data from textfile to vector and delete a selected row.
Can someone teach me how to store data from textfile to vector and delete a selected row. And after deleting, i want to write the changes in my textfile.
Do someone has an idea? :)nemesisjava wrote:
Can someone teach me how to store data from textfile to vector and delete a selected row. And after deleting, i want to write the changes in my textfile.
Do someone has an idea? :)What's the problem? What have you done so far? What failed?
What you described should be pretty easy to do.
Maybe you are looking for
-
please i went back a refund i use my account without a credit card than i purchase a app with 200 dollars and it was purchased and my account does not have a credit card and the money was taken from the credit card
-
Outlook 2013 and Icloud issues.
To whom it may concern, I use to have Windows 7 32 Bit and Office 2010 synced with my icloud and it worked wonderfully. I made some changes in to my operating system and changed to Windows 7 64bit. Also I went ahead and updated to Office 2013. Lately
-
"iTunes cannot read the contents of the iPod" ***!?!?!
my ipod is no longer recognized by itunes. ofcourse the only fix would be to restore it, but i can't restore it unless itunes recognizes my ipod..... quite a catch 22, ehh? so what the heck are we supposed to do now apple? it sure doesn't seem like i
-
File processing in FIle adapter
Hi, i have configured Sender File Adapter (FTP) in my scenario which picks the file from FTP folder and sends to JDBC. now i have 2 flat files in my FTP (yesterdays and todays). file names are test_07062010 and test_08062010. now my requirement is wh
-
How to find where used for PDF forms
Hello Everyone, I have a small issue. I want to find the where used list for a PDF form SD_INVOICE_FORM01. Just want to see the driver program which is calling this PDF form. Can some one help me in this regard? Quick response would be appriciated. T