Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

bdc error for TRIP

Former Member
0 Likes
1,435

i created one BDC program for TRIP tcode .

After entering personnel number in pop up window , it is going to next screen i.e main screen of trip.

SAPMP56T 2 . In this create travel request button which is on the left most corner is not triggering while doing upload.

if i click on that button it is going to next screen , there my data i s updating .

Except that " create travel request " button event entire operation is correct.

Each time i need to click on that button for appending data throgh bdc.

i checked in SHDB for recorded data by clicking PROCESS button .

Runtime error RAISE_EXCEPTION has occurred . In short dump it is showing.

A RAISE statement in the program "CL_GUI_HTML_VIEWER============CP" raised the

exception

condition "CNTL_ERROR".

please give suggestions..

thanks & regards,

Hari priya

11 REPLIES 11
Read only

Former Member
0 Likes
1,354

Hi,

Are you running your bdc in background?

In that case the OO object will give an error.

Regards,

Ankur Parab

Read only

Former Member
0 Likes
1,354

Dear Haripriya,

It is difficult to handle BDC for TRIP transaction because of its HTML screens.

Instead of that use standard function modules which are very useful. Right now are using the same FM. working fine.

HRTRV_IF_MODIFY_TRIP

Thanks and Regards,

Read only

0 Likes
1,354

hi chandra,

I want to create travel request for many of the employees using TRIP tcode .

I think the function module what you suggested is for modify of existed .

Can you please suggest any function module for newly creating travel request.

My template consists of follwing data.

1. Employee number .

2.START OF TRIP

3.TIME

4. END OF TRIP

5. TIME

6.1ST DESTINATION

7.COUNTRY

8.ACTIVITY

9.REASON

10.ESTIMATED COST

11.CRY

I tried both background and foreground. In background it is not working , but in foreground except that click operation on CREATE TRAVEL REQUEST it is working fine. But i need to click each time on CREATE TRAVEL REQUEST button while running in foreground.

kindly suggest any solution for rectifying the above problem.

thansk & regads,

hari priya

Read only

0 Likes
1,354

Dear Hari Priya,

You can use the same function module for create also by giving field value of FCODE(Changing parameters) as INS.

You need to pass all the data mentioned by you into FRAMEDATA of the Import parameters.

You can check the other function module:BAPI_TRIP_CREATE_FROM_DATA, almost having the same functionality of HRTRV_IF_MODIFY_TRIP.

When you are saving travel request from TRIP transaction, it will call one include SAVE_REQUEST, You can use this include if you are going for custom program or function module.

Thanks and Regards,

Chandra Madapati

Read only

0 Likes
1,354

Hi Chandra,

Thank you very much for your valuble suggestion.

I tried " HRTRV_IF_MODIFY_TRIiP " function module in test mode . But i came to know that Estimated Costs and currency fields are not able to pass from FRAMEDATA . Also i checked in BAPITRMAIN structure , where i found all my above mentioned fields from 2 TO 9 FILELDS. But except estimated costs and local currency.

Can u please tell me how to pass my above mentioned fields data into framedata .

thanks & regards,

Hari priya

Read only

0 Likes
1,354

Dear Hari priya,

Unfortunately that option of estimated cost is not there in HRTRV_IF_MODIFY_TRIP.

Try other function module:FITP_CREATE_TRIP_FROM_REQUEST

If this function module also not meeting you requirement, you need to write one custom program, for that use include save_request.

Thanks and Regards,

Chandra Madapati

Read only

0 Likes
1,354

HI chandra,

I think it is better to write custom program for creating travel requests with ref to template which will be provided by end user in text file ( total 11 fields as mentioned above).

Can u plz suggest me how to proceed for writing the custom program and what will be impact of save_request INCLUDE.

it will be helpful to me , if you provide any sample code for this..

thanks & regards,

hari priya

Read only

0 Likes
1,354

Dear Haripriya,

You need to pass all the fields into the subroutinue,

FORM SAVE_REQUEST TABLES   P_T_HEAD STRUCTURE   T_HEAD
                           P_T_PERIO STRUCTURE T_PERIO
                           P_T_REQ_HEAD STRUCTURE T_REQ_HEAD
                           P_T_REQUEST STRUCTURE T_REQUEST
                           P_T_REQ_REASON STRUCTURE T_REQ_REASON
                           P_T_REQ_ACCOUNT STRUCTURE T_REQ_ACCOUNT
                           P_T_REQ_ADVANCE STRUCTURE T_REQ_ADVANCE
                           P_T_PLAN STRUCTURE T_PLAN
                           P_T_ITEM STRUCTURE T_ITEM
                           P_T_VARIANT STRUCTURE T_VARIANT
                  USING    P_WA_HEAD      LIKE WA_HEAD
                           P_WA_PERIO     LIKE WA_PERIO
                           P_WA_REQ_HEAD  LIKE WA_REQ_HEAD
                           P_WA_REQUEST   LIKE WA_REQUEST
                           P_WA_REQ_REASON  LIKE WA_REQ_REASON
                           P_WA_REQ_ACCOUNT LIKE WA_REQ_ACCOUNT
                           P_WA_REQ_ADVANCE LIKE WA_REQ_ADVANCE
                           P_WA_PLAN        LIKE WA_PLAN
                           P_WA_ITEM        LIKE WA_ITEM
                           P_WA_VARIANT     LIKE WA_VARIANT
                           P_MOREI          LIKE PTRP_MOREI.

Sample code I will send to you by mail, please send your ID.

Thanks and Regards,

Read only

0 Likes
1,354

hi chandra,,

thank u very much for your prompt reply.

My is hariabap at g il , please provide sample code for uploading the above filelds which will be provided by end user in text file format.

thanks & regards,

Haripriya

Read only

0 Likes
1,354

Dear Hari,

I sent it. Please check

Regards,

Read only

0 Likes
1,354

hi chandra,

Thank you very much , i got your sample code.

I will try to modify code based on my requirement and let u know the status.

if i got any doughts in your custom code , i will let u know. please help me.

thanks & regards,

hari priya