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

iDoc

Former Member
0 Likes
752

Hi.

I have a program that creates an idoc (orders05) trough fm IDOC_INBOUND_SYNCHRONOUS.

My problem is that when I run my program in the background (batch) the idoc gets status 64 "IDoc ready to be transferred to application", when I run it in foreground the idoc is transfered. I have to run it as a batch. can enyone please help me?

/jon

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
701

Hi,

Have you enabled the option TRIGGER IMMEDIATELY in your partner profile.

Check the Schedule of Program RSEINB00

Reward if hlepful.

Regards

6 REPLIES 6
Read only

Former Member
0 Likes
702

Hi,

Have you enabled the option TRIGGER IMMEDIATELY in your partner profile.

Check the Schedule of Program RSEINB00

Reward if hlepful.

Regards

Read only

0 Likes
701

yes 'trigger...' is enabled.

Read only

Former Member
0 Likes
701

Hi Jon,

Schedule the Posting program(RSEBIN01 - Check this) in periodic basis so that your application document would get posted.

Thanks and Regards,

Prashanth

Read only

ferry_lianto
Active Contributor
0 Likes
701

Hi Jon,

Please try to use FM IDOC_INBOUND_WRITE_TO_DB instead of FM IDOC_INBOUND_SYNCHRONOUS.

CALL FUNCTION 'IDOC_INBOUND_WRITE_TO_DB'
    EXPORTING
      PI_STATUS_MESSAGE       = I_EDIDS
    IMPORTING
      PE_IDOC_NUMBER          = DOCNUM
      PE_STATE_OF_PROCESSING  = STPROC
      PE_INBOUND_PROCESS_DATA = I_TEDE2
    TABLES
      T_DATA_RECORDS          = I_EDIDD
    CHANGING
      PC_CONTROL_RECORD       = I_EDIDC
    EXCEPTIONS
      IDOC_NOT_SAVED          = 1
      OTHERS                  = 2.

To ensure the IDoc posted to application, you can schedule a job to run program RBDAPP01.

Hope this will help.

Regards,

Ferry Lianto

Please reward points if helpful.

Read only

Rashid_Javed
Contributor
0 Likes
701

Or better if you use IDOC_INBOUND_SINGLE. It accepts an internal table as input and process the idoc. I have used it in both foreground and background processing and it works just fine.

Example

CALL FUNCTION 'IDOC_INBOUND_SINGLE'

EXPORTING

pi_idoc_control_rec_40 = edi_dc40

  • PI_DO_COMMIT = 'X'

IMPORTING

pe_idoc_number = sys_idoc

pe_error_prior_to_application = sys_err

TABLES

pt_idoc_data_records_40 = edi_dd40

EXCEPTIONS

idoc_not_saved = 1

OTHERS = 2

Cheers

RJv
Read only

Laxmana_Appana_
Active Contributor
0 Likes
701

Hi,

Schedule the program RBDAPP01 in background with message type. then this program will pick up 64 status IDOC's and it will process.

Regards

Appana