cancel
Showing results for 
Search instead for 
Did you mean: 

Changes in PO

arsul_parshuram
Participant
0 Kudos

Dear All,

Good Morning,

My requirement is Change the PO SAP SCRIPT i need to Hard Code to PO based on Document type (EKKO-BSART) and

Purchasing Organization (EKKO-EKORG) and Plant (EKPO-WERKS).

Please advice me how to right the logic for perform.

how place on SCRIPT.

Regards,

Parshuram.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186052
Active Participant
0 Kudos

Hi Parshuram,

You can include a

PERFORM <name> IN PROGRAM <A FORM ROUTINE REPORT>

USING <FIELDS YOU WANT TO PASS TO THE FORM BASED ON YOUR REQUIREMENT>

CHANGING <IF YOU WANT ANY OUTPUT FROM YOUR FORM>

ENDPERFORM.

In SAP SCRIPT.

and in the form routine report you just need to write the code you want to based on the requirement.

FORM <NAME> TABLES <INPUT_TABLE> TYPE ITCSY <OUTPUT_TABLE> TYPE ITCSY.

INPUT TABLE contains USING parameters.

OUTPUT TABLE contains CHANGING parameters.

Hope this helps.

Regards,

-Sandeep

arsul_parshuram
Participant
0 Kudos

Thanks sir,

i have write subrutine program as per requirement it is working fine.

Now my problem is when i am passing variable value by using IF

arsul_parshuram
Participant
0 Kudos

Thanks sir,

i have write subrutine program as per requirement it is working fine.

Now my problem is when i am passing variable value by using IF conditions it is not work there is 6 if conditions

this is my script code.

/: IF &V_BSART& EQ 'PA' OR &V_BSART& EQ 'PC' OR

/= &V_BSART& EQ 'PE' OR &V_BSART& EQ 'PF' OR

/= &V_BSART& EQ 'PD'

/: ELSEIF &V_EKORG& EQ '1501' OR

/= &V_EKORG& EQ '1504' OR &V_EKORG& EQ '150'

/: ELSEIF &V_WERKS& EQ '1511'

/= OR &V_WERKS& EQ '1541' OR &V_WERKS& '1531'

/= OR &V_WERKS& '1512'

above code is not working proper.

Please help on this.

former_member186052
Active Participant
0 Kudos

Hi,

You can solve it by this way..

in the perform statement add another changing variable GV_FLAG.

put all the IF conditions in your FORM ENDFORM of the report and based on that set a flag GV_FLAG.

in the script check the GV_FLAG value and based on that your code will work.

Regards,

-Sandeep